diff options
| author | LorrensP-2158466 <lorrens.pantelis@student.uhasselt.be> | 2025-07-08 23:52:20 +0200 |
|---|---|---|
| committer | LorrensP-2158466 <lorrens.pantelis@student.uhasselt.be> | 2025-07-09 23:24:36 +0200 |
| commit | e9e31b1a932314e086b246fabb94623dda8fbafa (patch) | |
| tree | a642a27a191236e3a077111de7f6abc789933bd8 /compiler/rustc_resolve/src/macros.rs | |
| parent | e3fccdd4a16bf3aa223749efef1fa981589e43ae (diff) | |
| download | rust-e9e31b1a932314e086b246fabb94623dda8fbafa.tar.gz rust-e9e31b1a932314e086b246fabb94623dda8fbafa.zip | |
MacroData in ResolverArenas + split macro_map into extern_macro_map and local_macro_map.
Diffstat (limited to 'compiler/rustc_resolve/src/macros.rs')
| -rw-r--r-- | compiler/rustc_resolve/src/macros.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_resolve/src/macros.rs b/compiler/rustc_resolve/src/macros.rs index acbefe53422..c45d18900e2 100644 --- a/compiler/rustc_resolve/src/macros.rs +++ b/compiler/rustc_resolve/src/macros.rs @@ -354,8 +354,8 @@ impl<'ra, 'tcx> ResolverExpand for Resolver<'ra, 'tcx> { if unused_arms.is_empty() { continue; } - let def_id = self.local_def_id(node_id).to_def_id(); - let m = &self.macro_map[&def_id]; + let def_id = self.local_def_id(node_id); + let m = &self.local_macro_map[&def_id]; let SyntaxExtensionKind::LegacyBang(ref ext) = m.ext.kind else { continue; }; @@ -1132,7 +1132,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { } } - pub(crate) fn check_reserved_macro_name(&mut self, ident: Ident, res: Res) { + pub(crate) fn check_reserved_macro_name(&self, ident: Ident, res: Res) { // Reserve some names that are not quite covered by the general check // performed on `Resolver::builtin_attrs`. if ident.name == sym::cfg || ident.name == sym::cfg_attr { @@ -1148,7 +1148,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { /// /// Possibly replace its expander to a pre-defined one for built-in macros. pub(crate) fn compile_macro( - &mut self, + &self, macro_def: &ast::MacroDef, ident: Ident, attrs: &[rustc_hir::Attribute], |
