Rename Source::ast -> Source::value

This commit is contained in:
Aleksey Kladov
2019-11-20 09:40:36 +03:00
parent e975f6364c
commit 36e3fc9d54
43 changed files with 226 additions and 214 deletions

View File

@@ -49,9 +49,9 @@ pub(crate) fn attributes_query(
AttrDef::Module(it) => {
let src = it.declaration_source(db)?;
let hygiene = Hygiene::new(db, src.file_id);
Attr::from_attrs_owner(&src.ast, &hygiene)
Attr::from_attrs_owner(&src.value, &hygiene)
}
AttrDef::StructField(it) => match it.source(db).ast {
AttrDef::StructField(it) => match it.source(db).value {
FieldSource::Named(named) => {
let src = it.source(db);
let hygiene = Hygiene::new(db, src.file_id);
@@ -82,7 +82,7 @@ where
{
let src = node.source(db);
let hygiene = Hygiene::new(db, src.file_id);
Attr::from_attrs_owner(&src.ast, &hygiene)
Attr::from_attrs_owner(&src.value, &hygiene)
}
impl<T: Into<AttrDef> + Copy> Attrs for T {