@@ -170,12 +170,12 @@ impl TypoCandidate {
170170 }
171171}
172172
173- impl < ' ast , ' ra : ' ast , ' tcx > LateResolutionVisitor < ' _ , ' ast , ' ra , ' tcx > {
173+ impl < ' ast , ' ra , ' tcx > LateResolutionVisitor < ' _ , ' ast , ' ra , ' tcx > {
174174 fn make_base_error (
175175 & mut self ,
176176 path : & [ Segment ] ,
177177 span : Span ,
178- source : PathSource < ' _ , ' _ > ,
178+ source : PathSource < ' _ , ' _ , ' _ > ,
179179 res : Option < Res > ,
180180 ) -> BaseError {
181181 // Make the base error.
@@ -421,7 +421,7 @@ impl<'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
421421 path : & [ Segment ] ,
422422 following_seg : Option < & Segment > ,
423423 span : Span ,
424- source : PathSource < ' _ , ' _ > ,
424+ source : PathSource < ' _ , ' _ , ' _ > ,
425425 res : Option < Res > ,
426426 qself : Option < & QSelf > ,
427427 ) -> ( Diag < ' tcx > , Vec < ImportSuggestion > ) {
@@ -539,7 +539,7 @@ impl<'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
539539 path : & [ Segment ] ,
540540 following_seg : Option < & Segment > ,
541541 span : Span ,
542- source : PathSource < ' _ , ' _ > ,
542+ source : PathSource < ' _ , ' _ , ' _ > ,
543543 res : Option < Res > ,
544544 qself : Option < & QSelf > ,
545545 ) {
@@ -650,7 +650,7 @@ impl<'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
650650 fn try_lookup_name_relaxed (
651651 & mut self ,
652652 err : & mut Diag < ' _ > ,
653- source : PathSource < ' _ , ' _ > ,
653+ source : PathSource < ' _ , ' _ , ' _ > ,
654654 path : & [ Segment ] ,
655655 following_seg : Option < & Segment > ,
656656 span : Span ,
@@ -940,7 +940,7 @@ impl<'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
940940 fn suggest_trait_and_bounds (
941941 & mut self ,
942942 err : & mut Diag < ' _ > ,
943- source : PathSource < ' _ , ' _ > ,
943+ source : PathSource < ' _ , ' _ , ' _ > ,
944944 res : Option < Res > ,
945945 span : Span ,
946946 base_error : & BaseError ,
@@ -1017,7 +1017,7 @@ impl<'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
10171017 fn suggest_typo (
10181018 & mut self ,
10191019 err : & mut Diag < ' _ > ,
1020- source : PathSource < ' _ , ' _ > ,
1020+ source : PathSource < ' _ , ' _ , ' _ > ,
10211021 path : & [ Segment ] ,
10221022 following_seg : Option < & Segment > ,
10231023 span : Span ,
@@ -1063,7 +1063,7 @@ impl<'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
10631063 fn suggest_shadowed (
10641064 & mut self ,
10651065 err : & mut Diag < ' _ > ,
1066- source : PathSource < ' _ , ' _ > ,
1066+ source : PathSource < ' _ , ' _ , ' _ > ,
10671067 path : & [ Segment ] ,
10681068 following_seg : Option < & Segment > ,
10691069 span : Span ,
@@ -1096,7 +1096,7 @@ impl<'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
10961096 fn err_code_special_cases (
10971097 & mut self ,
10981098 err : & mut Diag < ' _ > ,
1099- source : PathSource < ' _ , ' _ > ,
1099+ source : PathSource < ' _ , ' _ , ' _ > ,
11001100 path : & [ Segment ] ,
11011101 span : Span ,
11021102 ) {
@@ -1141,7 +1141,7 @@ impl<'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
11411141 fn suggest_self_ty (
11421142 & mut self ,
11431143 err : & mut Diag < ' _ > ,
1144- source : PathSource < ' _ , ' _ > ,
1144+ source : PathSource < ' _ , ' _ , ' _ > ,
11451145 path : & [ Segment ] ,
11461146 span : Span ,
11471147 ) -> bool {
@@ -1164,7 +1164,7 @@ impl<'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
11641164 fn suggest_self_value (
11651165 & mut self ,
11661166 err : & mut Diag < ' _ > ,
1167- source : PathSource < ' _ , ' _ > ,
1167+ source : PathSource < ' _ , ' _ , ' _ > ,
11681168 path : & [ Segment ] ,
11691169 span : Span ,
11701170 ) -> bool {
@@ -1332,7 +1332,7 @@ impl<'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
13321332 fn suggest_swapping_misplaced_self_ty_and_trait (
13331333 & mut self ,
13341334 err : & mut Diag < ' _ > ,
1335- source : PathSource < ' _ , ' _ > ,
1335+ source : PathSource < ' _ , ' _ , ' _ > ,
13361336 res : Option < Res > ,
13371337 span : Span ,
13381338 ) {
@@ -1361,7 +1361,7 @@ impl<'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
13611361 & mut self ,
13621362 err : & mut Diag < ' _ > ,
13631363 res : Option < Res > ,
1364- source : PathSource < ' _ , ' _ > ,
1364+ source : PathSource < ' _ , ' _ , ' _ > ,
13651365 ) {
13661366 let PathSource :: TupleStruct ( _, _) = source else { return } ;
13671367 let Some ( Res :: Def ( DefKind :: Fn , _) ) = res else { return } ;
@@ -1373,7 +1373,7 @@ impl<'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
13731373 & mut self ,
13741374 err : & mut Diag < ' _ > ,
13751375 res : Option < Res > ,
1376- source : PathSource < ' _ , ' _ > ,
1376+ source : PathSource < ' _ , ' _ , ' _ > ,
13771377 span : Span ,
13781378 ) {
13791379 let PathSource :: Trait ( _) = source else { return } ;
@@ -1422,7 +1422,7 @@ impl<'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
14221422 fn suggest_pattern_match_with_let (
14231423 & mut self ,
14241424 err : & mut Diag < ' _ > ,
1425- source : PathSource < ' _ , ' _ > ,
1425+ source : PathSource < ' _ , ' _ , ' _ > ,
14261426 span : Span ,
14271427 ) -> bool {
14281428 if let PathSource :: Expr ( _) = source
@@ -1448,7 +1448,7 @@ impl<'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
14481448 fn get_single_associated_item (
14491449 & mut self ,
14501450 path : & [ Segment ] ,
1451- source : & PathSource < ' _ , ' _ > ,
1451+ source : & PathSource < ' _ , ' _ , ' _ > ,
14521452 filter_fn : & impl Fn ( Res ) -> bool ,
14531453 ) -> Option < TypoSuggestion > {
14541454 if let crate :: PathSource :: TraitItem ( _, _) = source {
@@ -1556,7 +1556,7 @@ impl<'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
15561556
15571557 /// Check if the source is call expression and the first argument is `self`. If true,
15581558 /// return the span of whole call and the span for all arguments expect the first one (`self`).
1559- fn call_has_self_arg ( & self , source : PathSource < ' _ , ' _ > ) -> Option < ( Span , Option < Span > ) > {
1559+ fn call_has_self_arg ( & self , source : PathSource < ' _ , ' _ , ' _ > ) -> Option < ( Span , Option < Span > ) > {
15601560 let mut has_self_arg = None ;
15611561 if let PathSource :: Expr ( Some ( parent) ) = source
15621562 && let ExprKind :: Call ( _, args) = & parent. kind
@@ -1614,7 +1614,7 @@ impl<'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
16141614 & mut self ,
16151615 err : & mut Diag < ' _ > ,
16161616 span : Span ,
1617- source : PathSource < ' _ , ' _ > ,
1617+ source : PathSource < ' _ , ' _ , ' _ > ,
16181618 path : & [ Segment ] ,
16191619 res : Res ,
16201620 path_str : & str ,
@@ -1666,7 +1666,7 @@ impl<'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
16661666 }
16671667 } ;
16681668
1669- let find_span = |source : & PathSource < ' _ , ' _ > , err : & mut Diag < ' _ > | {
1669+ let find_span = |source : & PathSource < ' _ , ' _ , ' _ > , err : & mut Diag < ' _ > | {
16701670 match source {
16711671 PathSource :: Expr ( Some ( Expr { span, kind : ExprKind :: Call ( _, _) , .. } ) )
16721672 | PathSource :: TupleStruct ( span, _) => {
@@ -2699,7 +2699,7 @@ impl<'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
26992699 fn suggest_using_enum_variant (
27002700 & mut self ,
27012701 err : & mut Diag < ' _ > ,
2702- source : PathSource < ' _ , ' _ > ,
2702+ source : PathSource < ' _ , ' _ , ' _ > ,
27032703 def_id : DefId ,
27042704 span : Span ,
27052705 ) {
@@ -2877,7 +2877,7 @@ impl<'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
28772877 pub ( crate ) fn suggest_adding_generic_parameter (
28782878 & self ,
28792879 path : & [ Segment ] ,
2880- source : PathSource < ' _ , ' _ > ,
2880+ source : PathSource < ' _ , ' _ , ' _ > ,
28812881 ) -> Option < ( Span , & ' static str , String , Applicability ) > {
28822882 let ( ident, span) = match path {
28832883 [ segment]
0 commit comments