mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
HasSource::source -> HasSource::source_old
To start migrating HasSource::source to return an Option.
This commit is contained in:
parent
aa3ce16f26
commit
27cadcd531
15 changed files with 55 additions and 55 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue