diff options
| author | Jacob Pratt <jacob@jhpratt.dev> | 2025-07-07 03:26:07 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-07 03:26:07 +0200 |
| commit | a1b51aa4003354ab4cb129f1ec9c4e4d45ddf803 (patch) | |
| tree | ff3ccb4b730ed39901072d4345401d8e1f306c5c /compiler/rustc_resolve/src/macros.rs | |
| parent | 11d8667f212cdd4c884bd8bf97c5faaabca7328b (diff) | |
| parent | 8ee1e9817c50d92a4337df7545782dc710fa9f75 (diff) | |
| download | rust-a1b51aa4003354ab4cb129f1ec9c4e4d45ddf803.tar.gz rust-a1b51aa4003354ab4cb129f1ec9c4e4d45ddf803.zip | |
Rollup merge of #143456 - joshtriplett:mbe-unused-rules-bitset, r=lqd
mbe: Change `unused_macro_rules` to a `DenseBitSet` Now that it only contains indexes, and no other information, a bitset provides a more compact and simpler representation. This builds on <https://github.com/rust-lang/rust/pull/143416>. Only the last commit is new.
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 9bc96403559..acbefe53422 100644 --- a/compiler/rustc_resolve/src/macros.rs +++ b/compiler/rustc_resolve/src/macros.rs @@ -334,7 +334,7 @@ impl<'ra, 'tcx> ResolverExpand for Resolver<'ra, 'tcx> { fn record_macro_rule_usage(&mut self, id: NodeId, rule_i: usize) { if let Some(rules) = self.unused_macro_rules.get_mut(&id) { - rules.remove(&rule_i); + rules.remove(rule_i); } } @@ -359,7 +359,7 @@ impl<'ra, 'tcx> ResolverExpand for Resolver<'ra, 'tcx> { let SyntaxExtensionKind::LegacyBang(ref ext) = m.ext.kind else { continue; }; - for &arm_i in unused_arms.to_sorted_stable_ord() { + for arm_i in unused_arms.iter() { if let Some((ident, rule_span)) = ext.get_unused_rule(arm_i) { self.lint_buffer.buffer_lint( UNUSED_MACRO_RULES, |
