Move confused_type_with_std_module to ResolverOutputs

This eliminates untracked global state from `Session`.
This commit is contained in:
Aaron Hill
2021-09-06 11:20:59 -05:00
parent 1c858ba5bf
commit 404402430d
6 changed files with 12 additions and 11 deletions

View File

@@ -1999,9 +1999,8 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
let item_span =
path.iter().last().map_or(span, |segment| segment.ident.span);
let mut hm = self.r.session.confused_type_with_std_module.borrow_mut();
hm.insert(item_span, span);
hm.insert(span, span);
self.r.confused_type_with_std_module.insert(item_span, span);
self.r.confused_type_with_std_module.insert(span, span);
}
}