Make ResolverAstLowering a struct.
This commit is contained in:
parent
47799de35a
commit
603746a35e
23 changed files with 352 additions and 261 deletions
|
@ -16,7 +16,6 @@ use crate::{Resolver, ResolverArenas, Segment, ToNameBinding, VisResolutionError
|
|||
use rustc_ast::visit::{self, AssocCtxt, Visitor};
|
||||
use rustc_ast::{self as ast, AssocItem, AssocItemKind, MetaItemKind, StmtKind};
|
||||
use rustc_ast::{Block, Fn, ForeignItem, ForeignItemKind, Impl, Item, ItemKind, NodeId};
|
||||
use rustc_ast_lowering::ResolverAstLowering;
|
||||
use rustc_attr as attr;
|
||||
use rustc_data_structures::sync::Lrc;
|
||||
use rustc_errors::{struct_span_err, Applicability};
|
||||
|
@ -27,7 +26,7 @@ use rustc_hir::def_id::{DefId, LocalDefId, CRATE_DEF_ID};
|
|||
use rustc_metadata::creader::LoadedMacro;
|
||||
use rustc_middle::bug;
|
||||
use rustc_middle::metadata::ModChild;
|
||||
use rustc_middle::ty;
|
||||
use rustc_middle::ty::{self, DefIdTree};
|
||||
use rustc_session::cstore::CrateStore;
|
||||
use rustc_span::hygiene::{ExpnId, LocalExpnId, MacroKind};
|
||||
use rustc_span::source_map::{respan, Spanned};
|
||||
|
@ -112,10 +111,7 @@ impl<'a> Resolver<'a> {
|
|||
loop {
|
||||
match self.get_module(def_id) {
|
||||
Some(module) => return module,
|
||||
None => {
|
||||
def_id.index =
|
||||
self.def_key(def_id).parent.expect("non-root `DefId` without parent")
|
||||
}
|
||||
None => def_id = self.parent(def_id),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue