@@ -25,7 +25,7 @@ use crate::imports::{Import, ImportKind, ImportResolver};
25
25
use crate :: path_names_to_string;
26
26
use crate :: { AmbiguityError , AmbiguityErrorMisc , AmbiguityKind } ;
27
27
use crate :: { BindingError , HasGenericParams , MacroRulesScope , Module , ModuleOrUniformRoot } ;
28
- use crate :: { Finalize , NameBinding , NameBindingKind , PrivacyError , VisResolutionError } ;
28
+ use crate :: { NameBinding , NameBindingKind , PrivacyError , VisResolutionError } ;
29
29
use crate :: { ParentScope , PathResult , ResolutionError , Resolver , Scope , ScopeSet , Segment } ;
30
30
31
31
type Res = def:: Res < ast:: NodeId > ;
@@ -1076,6 +1076,8 @@ impl<'a> Resolver<'a> {
1076
1076
& parent_scope,
1077
1077
None ,
1078
1078
false ,
1079
+ false ,
1080
+ None ,
1079
1081
) {
1080
1082
let desc = match binding. res ( ) {
1081
1083
Res :: Def ( DefKind :: Macro ( MacroKind :: Bang ) , _) => {
@@ -1422,7 +1424,7 @@ impl<'a, 'b> ImportResolver<'a, 'b> {
1422
1424
) -> Option < ( Vec < Segment > , Vec < String > ) > {
1423
1425
// Replace first ident with `self` and check if that is valid.
1424
1426
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) ;
1426
1428
debug ! ( "make_missing_self_suggestion: path={:?} result={:?}" , path, result) ;
1427
1429
if let PathResult :: Module ( ..) = result { Some ( ( path, Vec :: new ( ) ) ) } else { None }
1428
1430
}
@@ -1441,7 +1443,7 @@ impl<'a, 'b> ImportResolver<'a, 'b> {
1441
1443
) -> Option < ( Vec < Segment > , Vec < String > ) > {
1442
1444
// Replace first ident with `crate` and check if that is valid.
1443
1445
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) ;
1445
1447
debug ! ( "make_missing_crate_suggestion: path={:?} result={:?}" , path, result) ;
1446
1448
if let PathResult :: Module ( ..) = result {
1447
1449
Some ( (
@@ -1472,7 +1474,7 @@ impl<'a, 'b> ImportResolver<'a, 'b> {
1472
1474
) -> Option < ( Vec < Segment > , Vec < String > ) > {
1473
1475
// Replace first ident with `crate` and check if that is valid.
1474
1476
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) ;
1476
1478
debug ! ( "make_missing_super_suggestion: path={:?} result={:?}" , path, result) ;
1477
1479
if let PathResult :: Module ( ..) = result { Some ( ( path, Vec :: new ( ) ) ) } else { None }
1478
1480
}
@@ -1506,7 +1508,7 @@ impl<'a, 'b> ImportResolver<'a, 'b> {
1506
1508
for name in extern_crate_names. into_iter ( ) {
1507
1509
// Replace first ident with a crate name and check if that is valid.
1508
1510
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) ;
1510
1512
debug ! (
1511
1513
"make_external_crate_suggestion: name={:?} path={:?} result={:?}" ,
1512
1514
name, path, result
0 commit comments