@@ -24,7 +24,7 @@ impl<'a, 'b:'a, 'c: 'b> ImportResolver<'a, 'b, 'c> {
24
24
pub ( crate ) fn make_path_suggestion (
25
25
& mut self ,
26
26
span : Span ,
27
- path : Vec < Ident >
27
+ path : Vec < Ident > ,
28
28
parent_scope : & ParentScope < ' b > ,
29
29
) -> Option < ( Vec < Ident > , Option < String > ) > {
30
30
debug ! ( "make_path_suggestion: span={:?} path={:?}" , span, path) ;
@@ -63,11 +63,11 @@ impl<'a, 'b:'a, 'c: 'b> ImportResolver<'a, 'b, 'c> {
63
63
fn make_missing_self_suggestion (
64
64
& mut self ,
65
65
span : Span ,
66
- mut path : Vec < Ident >
66
+ mut path : Vec < Ident > ,
67
67
parent_scope : & ParentScope < ' b > ,
68
68
) -> Option < ( Vec < Ident > , Option < String > ) > {
69
69
// Replace first ident with `self` and check if that is valid.
70
- path[ 0 ] = keywords:: SelfValue . name ( ) ;
70
+ path[ 0 ] . name = keywords:: SelfValue . name ( ) ;
71
71
let result = self . resolve_path ( None , & path, None , parent_scope, false , span, CrateLint :: No ) ;
72
72
debug ! ( "make_missing_self_suggestion: path={:?} result={:?}" , path, result) ;
73
73
if let PathResult :: Module ( ..) = result {
@@ -87,11 +87,11 @@ impl<'a, 'b:'a, 'c: 'b> ImportResolver<'a, 'b, 'c> {
87
87
fn make_missing_crate_suggestion (
88
88
& mut self ,
89
89
span : Span ,
90
- mut path : Vec < Ident >
90
+ mut path : Vec < Ident > ,
91
91
parent_scope : & ParentScope < ' b > ,
92
92
) -> Option < ( Vec < Ident > , Option < String > ) > {
93
93
// Replace first ident with `crate` and check if that is valid.
94
- path[ 0 ] = keywords:: Crate . name ( ) ;
94
+ path[ 0 ] . name = keywords:: Crate . name ( ) ;
95
95
let result = self . resolve_path ( None , & path, None , parent_scope, false , span, CrateLint :: No ) ;
96
96
debug ! ( "make_missing_crate_suggestion: path={:?} result={:?}" , path, result) ;
97
97
if let PathResult :: Module ( ..) = result {
@@ -118,12 +118,11 @@ impl<'a, 'b:'a, 'c: 'b> ImportResolver<'a, 'b, 'c> {
118
118
fn make_missing_super_suggestion (
119
119
& mut self ,
120
120
span : Span ,
121
- mut path : Vec < Ident >
121
+ mut path : Vec < Ident > ,
122
122
parent_scope : & ParentScope < ' b > ,
123
123
) -> Option < ( Vec < Ident > , Option < String > ) > {
124
124
// Replace first ident with `crate` and check if that is valid.
125
- path[ 0 ] = keywords:: Super . name ( ) ;
126
- let result = self . resolve_path ( None , & path, None , false , span, CrateLint :: No ) ;
125
+ path[ 0 ] . name = keywords:: Super . name ( ) ;
127
126
let result = self . resolve_path ( None , & path, None , parent_scope, false , span, CrateLint :: No ) ;
128
127
debug ! ( "make_missing_super_suggestion: path={:?} result={:?}" , path, result) ;
129
128
if let PathResult :: Module ( ..) = result {
@@ -146,7 +145,7 @@ impl<'a, 'b:'a, 'c: 'b> ImportResolver<'a, 'b, 'c> {
146
145
fn make_external_crate_suggestion (
147
146
& mut self ,
148
147
span : Span ,
149
- mut path : Vec < Ident >
148
+ mut path : Vec < Ident > ,
150
149
parent_scope : & ParentScope < ' b > ,
151
150
) -> Option < ( Vec < Ident > , Option < String > ) > {
152
151
// Need to clone else we can't call `resolve_path` without a borrow error. We also store
0 commit comments