@@ -38,8 +38,8 @@ use crate::late::{
38
38
} ;
39
39
use crate :: ty:: fast_reject:: SimplifiedType ;
40
40
use crate :: {
41
- Module , ModuleKind , ModuleOrUniformRoot , PathResult , PathSource , Resolver , ScopeSet , Segment ,
42
- errors, path_names_to_string,
41
+ Module , ModuleKind , ModuleOrUniformRoot , ParentScope , PathResult , PathSource , Resolver ,
42
+ ScopeSet , Segment , errors, path_names_to_string,
43
43
} ;
44
44
45
45
type Res = def:: Res < ast:: NodeId > ;
@@ -2460,10 +2460,11 @@ impl<'ast, 'ra, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
2460
2460
self . r . add_module_candidates ( module, & mut names, & filter_fn, Some ( ctxt) ) ;
2461
2461
} else if let RibKind :: Module ( module) = rib. kind {
2462
2462
// Encountered a module item, abandon ribs and look into that module and preludes.
2463
+ let parent_scope = & ParentScope { module, ..self . parent_scope } ;
2463
2464
self . r . add_scope_set_candidates (
2464
2465
& mut names,
2465
- ScopeSet :: Late ( ns, module , None ) ,
2466
- & self . parent_scope ,
2466
+ ScopeSet :: Late ( ns, None ) ,
2467
+ parent_scope,
2467
2468
ctxt,
2468
2469
filter_fn,
2469
2470
) ;
0 commit comments