1
Fork 0

resolve: Simplify collection of traits in scope

This commit is contained in:
Vadim Petrochenkov 2021-01-06 23:50:02 +03:00
parent 6526e5c772
commit b7071b2353
7 changed files with 141 additions and 163 deletions

View file

@ -115,7 +115,7 @@ impl<'a> Resolver<'a> {
self.get_module(parent_id)
}
crate fn get_module(&mut self, def_id: DefId) -> Module<'a> {
pub fn get_module(&mut self, def_id: DefId) -> Module<'a> {
// If this is a local module, it will be in `module_map`, no need to recalculate it.
if let Some(def_id) = def_id.as_local() {
return self.module_map[&def_id];