1
Fork 0

Only compute the trait_map once.

This commit is contained in:
Camille GILLOT 2021-04-04 14:24:27 +02:00
parent 59579907ab
commit 139f7ad637
5 changed files with 19 additions and 27 deletions

View file

@ -1138,8 +1138,8 @@ impl ResolverAstLowering for Resolver<'_> {
self.next_node_id()
}
fn trait_map(&self) -> &NodeMap<Vec<TraitCandidate>> {
&self.trait_map
fn trait_map(&mut self) -> NodeMap<Vec<TraitCandidate>> {
std::mem::take(&mut self.trait_map)
}
fn opt_local_def_id(&self, node: NodeId) -> Option<LocalDefId> {