resolve: Do not cache nearest parent mod in ModuleData
This commit is contained in:
@@ -1872,7 +1872,7 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
|
||||
if this.should_report_errs() {
|
||||
let (err, candidates) = this.smart_resolve_report_errors(path, span, source, res);
|
||||
|
||||
let def_id = this.parent_scope.module.nearest_parent_mod;
|
||||
let def_id = this.parent_scope.module.nearest_parent_mod();
|
||||
let instead = res.is_some();
|
||||
let suggestion =
|
||||
if res.is_none() { this.report_missing_type_error(path) } else { None };
|
||||
@@ -1940,7 +1940,7 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
|
||||
|
||||
drop(parent_err);
|
||||
|
||||
let def_id = this.parent_scope.module.nearest_parent_mod;
|
||||
let def_id = this.parent_scope.module.nearest_parent_mod();
|
||||
|
||||
if this.should_report_errs() {
|
||||
this.r.use_injections.push(UseError {
|
||||
|
||||
Reference in New Issue
Block a user