@@ -24,7 +24,7 @@ impl<'a, 'b:'a, 'c: 'b> ImportResolver<'a, 'b, 'c> {
2424 pub ( crate ) fn make_path_suggestion (
2525 & mut self ,
2626 span : Span ,
27- path : Vec < Ident >
27+ path : Vec < Ident > ,
2828 parent_scope : & ParentScope < ' b > ,
2929 ) -> Option < ( Vec < Ident > , Option < String > ) > {
3030 debug ! ( "make_path_suggestion: span={:?} path={:?}" , span, path) ;
@@ -63,11 +63,11 @@ impl<'a, 'b:'a, 'c: 'b> ImportResolver<'a, 'b, 'c> {
6363 fn make_missing_self_suggestion (
6464 & mut self ,
6565 span : Span ,
66- mut path : Vec < Ident >
66+ mut path : Vec < Ident > ,
6767 parent_scope : & ParentScope < ' b > ,
6868 ) -> Option < ( Vec < Ident > , Option < String > ) > {
6969 // Replace first ident with `self` and check if that is valid.
70- path[ 0 ] = keywords:: SelfValue . name ( ) ;
70+ path[ 0 ] . name = keywords:: SelfValue . name ( ) ;
7171 let result = self . resolve_path ( None , & path, None , parent_scope, false , span, CrateLint :: No ) ;
7272 debug ! ( "make_missing_self_suggestion: path={:?} result={:?}" , path, result) ;
7373 if let PathResult :: Module ( ..) = result {
@@ -87,11 +87,11 @@ impl<'a, 'b:'a, 'c: 'b> ImportResolver<'a, 'b, 'c> {
8787 fn make_missing_crate_suggestion (
8888 & mut self ,
8989 span : Span ,
90- mut path : Vec < Ident >
90+ mut path : Vec < Ident > ,
9191 parent_scope : & ParentScope < ' b > ,
9292 ) -> Option < ( Vec < Ident > , Option < String > ) > {
9393 // Replace first ident with `crate` and check if that is valid.
94- path[ 0 ] = keywords:: Crate . name ( ) ;
94+ path[ 0 ] . name = keywords:: Crate . name ( ) ;
9595 let result = self . resolve_path ( None , & path, None , parent_scope, false , span, CrateLint :: No ) ;
9696 debug ! ( "make_missing_crate_suggestion: path={:?} result={:?}" , path, result) ;
9797 if let PathResult :: Module ( ..) = result {
@@ -118,12 +118,11 @@ impl<'a, 'b:'a, 'c: 'b> ImportResolver<'a, 'b, 'c> {
118118 fn make_missing_super_suggestion (
119119 & mut self ,
120120 span : Span ,
121- mut path : Vec < Ident >
121+ mut path : Vec < Ident > ,
122122 parent_scope : & ParentScope < ' b > ,
123123 ) -> Option < ( Vec < Ident > , Option < String > ) > {
124124 // 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 ( ) ;
127126 let result = self . resolve_path ( None , & path, None , parent_scope, false , span, CrateLint :: No ) ;
128127 debug ! ( "make_missing_super_suggestion: path={:?} result={:?}" , path, result) ;
129128 if let PathResult :: Module ( ..) = result {
@@ -146,7 +145,7 @@ impl<'a, 'b:'a, 'c: 'b> ImportResolver<'a, 'b, 'c> {
146145 fn make_external_crate_suggestion (
147146 & mut self ,
148147 span : Span ,
149- mut path : Vec < Ident >
148+ mut path : Vec < Ident > ,
150149 parent_scope : & ParentScope < ' b > ,
151150 ) -> Option < ( Vec < Ident > , Option < String > ) > {
152151 // Need to clone else we can't call `resolve_path` without a borrow error. We also store
0 commit comments