resolve: Avoid comparing modules by optional def-id
It makes all block modules identical during comparison
This commit is contained in:
@@ -1491,7 +1491,7 @@ impl<'a: 'ast, 'ast> LateResolutionVisitor<'a, '_, 'ast> {
|
||||
// form the path
|
||||
let mut path_segments = path_segments.clone();
|
||||
path_segments.push(ast::PathSegment::from_ident(ident));
|
||||
let module_def_id = module.def_id().unwrap();
|
||||
let module_def_id = module.def_id();
|
||||
if module_def_id == def_id {
|
||||
let path =
|
||||
Path { span: name_binding.span, segments: path_segments, tokens: None };
|
||||
|
||||
Reference in New Issue
Block a user