mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 20:09:19 +00:00
Unleash macro 2.0 in hightlight and more
This commit is contained in:
parent
a193666361
commit
4520002b63
12 changed files with 49 additions and 31 deletions
|
@ -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),
|
||||
|
|
|
@ -191,10 +191,7 @@ impl SourceToDefCtx<'_, '_> {
|
|||
}
|
||||
|
||||
// FIXME: use DynMap as well?
|
||||
pub(super) fn macro_rules_to_def(
|
||||
&mut self,
|
||||
src: InFile<ast::MacroRules>,
|
||||
) -> Option<MacroDefId> {
|
||||
pub(super) fn macro_to_def(&mut self, src: InFile<ast::Macro>) -> Option<MacroDefId> {
|
||||
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue