diff options
Diffstat (limited to 'crates/hir/src')
-rw-r--r-- | crates/hir/src/code_model.rs | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/crates/hir/src/code_model.rs b/crates/hir/src/code_model.rs index 285905e96..62237f481 100644 --- a/crates/hir/src/code_model.rs +++ b/crates/hir/src/code_model.rs | |||
@@ -983,14 +983,7 @@ impl MacroDef { | |||
983 | 983 | ||
984 | /// XXX: this parses the file | 984 | /// XXX: this parses the file |
985 | pub fn name(self, db: &dyn HirDatabase) -> Option<Name> { | 985 | pub fn name(self, db: &dyn HirDatabase) -> Option<Name> { |
986 | // FIXME: Currently proc-macro do not have ast-node, | 986 | self.source(db)?.value.name().map(|it| it.as_name()) |
987 | // such that it does not have source | ||
988 | // more discussion: https://github.com/rust-analyzer/rust-analyzer/issues/6913 | ||
989 | if self.is_proc_macro() { | ||
990 | return None; | ||
991 | } | ||
992 | #[allow(deprecated)] | ||
993 | self.source_old(db).value.name().map(|it| it.as_name()) | ||
994 | } | 987 | } |
995 | 988 | ||
996 | /// Indicate it is a proc-macro | 989 | /// Indicate it is a proc-macro |