HasSource::source -> HasSource::source_old

To start migrating HasSource::source to return an Option.
This commit is contained in:
Nick Spain 2021-01-01 13:05:28 +11:00
parent aa3ce16f26
commit 27cadcd531
15 changed files with 55 additions and 55 deletions

View file

@ -989,7 +989,7 @@ impl MacroDef {
if self.is_proc_macro() {
return None;
}
self.source(db).value.name().map(|it| it.as_name())
self.source_old(db).value.name().map(|it| it.as_name())
}
/// Indicate it is a proc-macro
@ -1378,7 +1378,7 @@ impl Impl {
}
pub fn is_builtin_derive(self, db: &dyn HirDatabase) -> Option<InFile<ast::Attr>> {
let src = self.source(db);
let src = self.source_old(db);
let item = src.file_id.is_builtin_derive(db.upcast())?;
let hygenic = hir_expand::hygiene::Hygiene::new(db.upcast(), item.file_id);