diff options
| author | Oli Scherer <github333195615777966@oli-obk.de> | 2025-04-09 13:40:00 +0000 |
|---|---|---|
| committer | Oli Scherer <github333195615777966@oli-obk.de> | 2025-04-11 09:33:38 +0000 |
| commit | 24efefafcbddfba5d26330d33f2516ae04aa454f (patch) | |
| tree | b78e7157fb8598f31a57f3cc734ce93b8919449c /compiler/rustc_resolve/src/macros.rs | |
| parent | 18a029cfe8e761533634bda8fe8a14e30280a21b (diff) | |
| download | rust-24efefafcbddfba5d26330d33f2516ae04aa454f.tar.gz rust-24efefafcbddfba5d26330d33f2516ae04aa454f.zip | |
Avoid a reverse map that is only used in diagnostics paths
Diffstat (limited to 'compiler/rustc_resolve/src/macros.rs')
| -rw-r--r-- | compiler/rustc_resolve/src/macros.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_resolve/src/macros.rs b/compiler/rustc_resolve/src/macros.rs index e2f783d887e..1e744d4a64e 100644 --- a/compiler/rustc_resolve/src/macros.rs +++ b/compiler/rustc_resolve/src/macros.rs @@ -345,7 +345,7 @@ impl<'ra, 'tcx> ResolverExpand for Resolver<'ra, 'tcx> { // We already lint the entire macro as unused continue; } - let node_id = self.def_id_to_node_id[def_id]; + let node_id = self.def_id_to_node_id(def_id); self.lint_buffer.buffer_lint( UNUSED_MACRO_RULES, node_id, @@ -932,7 +932,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { .invocation_parents .get(&parent_scope.expansion) .map_or(ast::CRATE_NODE_ID, |parent| { - self.def_id_to_node_id[parent.parent_def] + self.def_id_to_node_id(parent.parent_def) }); self.lint_buffer.buffer_lint( LEGACY_DERIVE_HELPERS, |
