resolve: Avoid some unstable iteration 2
This commit is contained in:
@@ -323,7 +323,6 @@ impl<'ra, 'tcx> ResolverExpand for Resolver<'ra, 'tcx> {
|
||||
}
|
||||
|
||||
fn check_unused_macros(&mut self) {
|
||||
#[allow(rustc::potential_query_instability)] // FIXME
|
||||
for (_, &(node_id, ident)) in self.unused_macros.iter() {
|
||||
self.lint_buffer.buffer_lint(
|
||||
UNUSED_MACROS,
|
||||
@@ -576,7 +575,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
|
||||
match res {
|
||||
Res::Def(DefKind::Macro(_), def_id) => {
|
||||
if let Some(def_id) = def_id.as_local() {
|
||||
self.unused_macros.remove(&def_id);
|
||||
self.unused_macros.swap_remove(&def_id);
|
||||
if self.proc_macro_stubs.contains(&def_id) {
|
||||
self.dcx().emit_err(errors::ProcMacroSameCrate {
|
||||
span: path.span,
|
||||
|
||||
Reference in New Issue
Block a user