@@ -25,7 +25,7 @@ use crate::imports::{Import, ImportKind, ImportResolver};
2525use crate :: path_names_to_string;
2626use crate :: { AmbiguityError , AmbiguityErrorMisc , AmbiguityKind } ;
2727use crate :: { BindingError , HasGenericParams , MacroRulesScope , Module , ModuleOrUniformRoot } ;
28- use crate :: { Finalize , NameBinding , NameBindingKind , PrivacyError , VisResolutionError } ;
28+ use crate :: { NameBinding , NameBindingKind , PrivacyError , VisResolutionError } ;
2929use crate :: { ParentScope , PathResult , ResolutionError , Resolver , Scope , ScopeSet , Segment } ;
3030
3131type Res = def:: Res < ast:: NodeId > ;
@@ -1076,6 +1076,8 @@ impl<'a> Resolver<'a> {
10761076 & parent_scope,
10771077 None ,
10781078 false ,
1079+ false ,
1080+ None ,
10791081 ) {
10801082 let desc = match binding. res ( ) {
10811083 Res :: Def ( DefKind :: Macro ( MacroKind :: Bang ) , _) => {
@@ -1422,7 +1424,7 @@ impl<'a, 'b> ImportResolver<'a, 'b> {
14221424 ) -> Option < ( Vec < Segment > , Vec < String > ) > {
14231425 // Replace first ident with `self` and check if that is valid.
14241426 path[ 0 ] . ident . name = kw:: SelfLower ;
1425- let result = self . r . resolve_path ( & path, None , parent_scope, Finalize :: No ) ;
1427+ let result = self . r . maybe_resolve_path ( & path, None , parent_scope) ;
14261428 debug ! ( "make_missing_self_suggestion: path={:?} result={:?}" , path, result) ;
14271429 if let PathResult :: Module ( ..) = result { Some ( ( path, Vec :: new ( ) ) ) } else { None }
14281430 }
@@ -1441,7 +1443,7 @@ impl<'a, 'b> ImportResolver<'a, 'b> {
14411443 ) -> Option < ( Vec < Segment > , Vec < String > ) > {
14421444 // Replace first ident with `crate` and check if that is valid.
14431445 path[ 0 ] . ident . name = kw:: Crate ;
1444- let result = self . r . resolve_path ( & path, None , parent_scope, Finalize :: No ) ;
1446+ let result = self . r . maybe_resolve_path ( & path, None , parent_scope) ;
14451447 debug ! ( "make_missing_crate_suggestion: path={:?} result={:?}" , path, result) ;
14461448 if let PathResult :: Module ( ..) = result {
14471449 Some ( (
@@ -1472,7 +1474,7 @@ impl<'a, 'b> ImportResolver<'a, 'b> {
14721474 ) -> Option < ( Vec < Segment > , Vec < String > ) > {
14731475 // Replace first ident with `crate` and check if that is valid.
14741476 path[ 0 ] . ident . name = kw:: Super ;
1475- let result = self . r . resolve_path ( & path, None , parent_scope, Finalize :: No ) ;
1477+ let result = self . r . maybe_resolve_path ( & path, None , parent_scope) ;
14761478 debug ! ( "make_missing_super_suggestion: path={:?} result={:?}" , path, result) ;
14771479 if let PathResult :: Module ( ..) = result { Some ( ( path, Vec :: new ( ) ) ) } else { None }
14781480 }
@@ -1506,7 +1508,7 @@ impl<'a, 'b> ImportResolver<'a, 'b> {
15061508 for name in extern_crate_names. into_iter ( ) {
15071509 // Replace first ident with a crate name and check if that is valid.
15081510 path[ 0 ] . ident . name = name;
1509- let result = self . r . resolve_path ( & path, None , parent_scope, Finalize :: No ) ;
1511+ let result = self . r . maybe_resolve_path ( & path, None , parent_scope) ;
15101512 debug ! (
15111513 "make_external_crate_suggestion: name={:?} path={:?} result={:?}" ,
15121514 name, path, result
0 commit comments