From 4520002b63b5a27e7676822aecfb2d435bf36e5a Mon Sep 17 00:00:00 2001 From: Edwin Cheng Date: Sat, 27 Mar 2021 13:48:15 +0800 Subject: Unleash macro 2.0 in hightlight and more --- crates/hir/src/semantics.rs | 2 +- crates/hir/src/semantics/source_to_def.rs | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'crates/hir/src') diff --git a/crates/hir/src/semantics.rs b/crates/hir/src/semantics.rs index 3ff135f41..d3caeef4e 100644 --- a/crates/hir/src/semantics.rs +++ b/crates/hir/src/semantics.rs @@ -768,7 +768,7 @@ to_def_impls![ (crate::TypeParam, ast::TypeParam, type_param_to_def), (crate::LifetimeParam, ast::LifetimeParam, lifetime_param_to_def), (crate::ConstParam, ast::ConstParam, const_param_to_def), - (crate::MacroDef, ast::MacroRules, macro_rules_to_def), + (crate::MacroDef, ast::Macro, macro_to_def), (crate::Local, ast::IdentPat, bind_pat_to_def), (crate::Local, ast::SelfParam, self_param_to_def), (crate::Label, ast::Label, label_to_def), diff --git a/crates/hir/src/semantics/source_to_def.rs b/crates/hir/src/semantics/source_to_def.rs index 762809fcd..9a5a2255f 100644 --- a/crates/hir/src/semantics/source_to_def.rs +++ b/crates/hir/src/semantics/source_to_def.rs @@ -191,10 +191,7 @@ impl SourceToDefCtx<'_, '_> { } // FIXME: use DynMap as well? - pub(super) fn macro_rules_to_def( - &mut self, - src: InFile, - ) -> Option { + pub(super) fn macro_to_def(&mut self, src: InFile) -> Option { let file_ast_id = self.db.ast_id_map(src.file_id).ast_id(&src.value); let ast_id = AstId::new(src.file_id, file_ast_id.upcast()); let kind = MacroDefKind::Declarative(ast_id); -- cgit v1.2.3