@@ -170,12 +170,12 @@ impl TypoCandidate {
170
170
}
171
171
}
172
172
173
- impl < ' ast , ' ra : ' ast , ' tcx > LateResolutionVisitor < ' _ , ' ast , ' ra , ' tcx > {
173
+ impl < ' ast , ' ra , ' tcx > LateResolutionVisitor < ' _ , ' ast , ' ra , ' tcx > {
174
174
fn make_base_error (
175
175
& mut self ,
176
176
path : & [ Segment ] ,
177
177
span : Span ,
178
- source : PathSource < ' _ , ' _ > ,
178
+ source : PathSource < ' _ , ' _ , ' _ > ,
179
179
res : Option < Res > ,
180
180
) -> BaseError {
181
181
// Make the base error.
@@ -421,7 +421,7 @@ impl<'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
421
421
path : & [ Segment ] ,
422
422
following_seg : Option < & Segment > ,
423
423
span : Span ,
424
- source : PathSource < ' _ , ' _ > ,
424
+ source : PathSource < ' _ , ' _ , ' _ > ,
425
425
res : Option < Res > ,
426
426
qself : Option < & QSelf > ,
427
427
) -> ( Diag < ' tcx > , Vec < ImportSuggestion > ) {
@@ -539,7 +539,7 @@ impl<'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
539
539
path : & [ Segment ] ,
540
540
following_seg : Option < & Segment > ,
541
541
span : Span ,
542
- source : PathSource < ' _ , ' _ > ,
542
+ source : PathSource < ' _ , ' _ , ' _ > ,
543
543
res : Option < Res > ,
544
544
qself : Option < & QSelf > ,
545
545
) {
@@ -650,7 +650,7 @@ impl<'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
650
650
fn try_lookup_name_relaxed (
651
651
& mut self ,
652
652
err : & mut Diag < ' _ > ,
653
- source : PathSource < ' _ , ' _ > ,
653
+ source : PathSource < ' _ , ' _ , ' _ > ,
654
654
path : & [ Segment ] ,
655
655
following_seg : Option < & Segment > ,
656
656
span : Span ,
@@ -940,7 +940,7 @@ impl<'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
940
940
fn suggest_trait_and_bounds (
941
941
& mut self ,
942
942
err : & mut Diag < ' _ > ,
943
- source : PathSource < ' _ , ' _ > ,
943
+ source : PathSource < ' _ , ' _ , ' _ > ,
944
944
res : Option < Res > ,
945
945
span : Span ,
946
946
base_error : & BaseError ,
@@ -1017,7 +1017,7 @@ impl<'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
1017
1017
fn suggest_typo (
1018
1018
& mut self ,
1019
1019
err : & mut Diag < ' _ > ,
1020
- source : PathSource < ' _ , ' _ > ,
1020
+ source : PathSource < ' _ , ' _ , ' _ > ,
1021
1021
path : & [ Segment ] ,
1022
1022
following_seg : Option < & Segment > ,
1023
1023
span : Span ,
@@ -1063,7 +1063,7 @@ impl<'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
1063
1063
fn suggest_shadowed (
1064
1064
& mut self ,
1065
1065
err : & mut Diag < ' _ > ,
1066
- source : PathSource < ' _ , ' _ > ,
1066
+ source : PathSource < ' _ , ' _ , ' _ > ,
1067
1067
path : & [ Segment ] ,
1068
1068
following_seg : Option < & Segment > ,
1069
1069
span : Span ,
@@ -1096,7 +1096,7 @@ impl<'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
1096
1096
fn err_code_special_cases (
1097
1097
& mut self ,
1098
1098
err : & mut Diag < ' _ > ,
1099
- source : PathSource < ' _ , ' _ > ,
1099
+ source : PathSource < ' _ , ' _ , ' _ > ,
1100
1100
path : & [ Segment ] ,
1101
1101
span : Span ,
1102
1102
) {
@@ -1141,7 +1141,7 @@ impl<'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
1141
1141
fn suggest_self_ty (
1142
1142
& mut self ,
1143
1143
err : & mut Diag < ' _ > ,
1144
- source : PathSource < ' _ , ' _ > ,
1144
+ source : PathSource < ' _ , ' _ , ' _ > ,
1145
1145
path : & [ Segment ] ,
1146
1146
span : Span ,
1147
1147
) -> bool {
@@ -1164,7 +1164,7 @@ impl<'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
1164
1164
fn suggest_self_value (
1165
1165
& mut self ,
1166
1166
err : & mut Diag < ' _ > ,
1167
- source : PathSource < ' _ , ' _ > ,
1167
+ source : PathSource < ' _ , ' _ , ' _ > ,
1168
1168
path : & [ Segment ] ,
1169
1169
span : Span ,
1170
1170
) -> bool {
@@ -1332,7 +1332,7 @@ impl<'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
1332
1332
fn suggest_swapping_misplaced_self_ty_and_trait (
1333
1333
& mut self ,
1334
1334
err : & mut Diag < ' _ > ,
1335
- source : PathSource < ' _ , ' _ > ,
1335
+ source : PathSource < ' _ , ' _ , ' _ > ,
1336
1336
res : Option < Res > ,
1337
1337
span : Span ,
1338
1338
) {
@@ -1361,7 +1361,7 @@ impl<'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
1361
1361
& mut self ,
1362
1362
err : & mut Diag < ' _ > ,
1363
1363
res : Option < Res > ,
1364
- source : PathSource < ' _ , ' _ > ,
1364
+ source : PathSource < ' _ , ' _ , ' _ > ,
1365
1365
) {
1366
1366
let PathSource :: TupleStruct ( _, _) = source else { return } ;
1367
1367
let Some ( Res :: Def ( DefKind :: Fn , _) ) = res else { return } ;
@@ -1373,7 +1373,7 @@ impl<'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
1373
1373
& mut self ,
1374
1374
err : & mut Diag < ' _ > ,
1375
1375
res : Option < Res > ,
1376
- source : PathSource < ' _ , ' _ > ,
1376
+ source : PathSource < ' _ , ' _ , ' _ > ,
1377
1377
span : Span ,
1378
1378
) {
1379
1379
let PathSource :: Trait ( _) = source else { return } ;
@@ -1422,7 +1422,7 @@ impl<'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
1422
1422
fn suggest_pattern_match_with_let (
1423
1423
& mut self ,
1424
1424
err : & mut Diag < ' _ > ,
1425
- source : PathSource < ' _ , ' _ > ,
1425
+ source : PathSource < ' _ , ' _ , ' _ > ,
1426
1426
span : Span ,
1427
1427
) -> bool {
1428
1428
if let PathSource :: Expr ( _) = source
@@ -1448,7 +1448,7 @@ impl<'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
1448
1448
fn get_single_associated_item (
1449
1449
& mut self ,
1450
1450
path : & [ Segment ] ,
1451
- source : & PathSource < ' _ , ' _ > ,
1451
+ source : & PathSource < ' _ , ' _ , ' _ > ,
1452
1452
filter_fn : & impl Fn ( Res ) -> bool ,
1453
1453
) -> Option < TypoSuggestion > {
1454
1454
if let crate :: PathSource :: TraitItem ( _, _) = source {
@@ -1556,7 +1556,7 @@ impl<'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
1556
1556
1557
1557
/// Check if the source is call expression and the first argument is `self`. If true,
1558
1558
/// 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 > ) > {
1560
1560
let mut has_self_arg = None ;
1561
1561
if let PathSource :: Expr ( Some ( parent) ) = source
1562
1562
&& let ExprKind :: Call ( _, args) = & parent. kind
@@ -1614,7 +1614,7 @@ impl<'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
1614
1614
& mut self ,
1615
1615
err : & mut Diag < ' _ > ,
1616
1616
span : Span ,
1617
- source : PathSource < ' _ , ' _ > ,
1617
+ source : PathSource < ' _ , ' _ , ' _ > ,
1618
1618
path : & [ Segment ] ,
1619
1619
res : Res ,
1620
1620
path_str : & str ,
@@ -1666,7 +1666,7 @@ impl<'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
1666
1666
}
1667
1667
} ;
1668
1668
1669
- let find_span = |source : & PathSource < ' _ , ' _ > , err : & mut Diag < ' _ > | {
1669
+ let find_span = |source : & PathSource < ' _ , ' _ , ' _ > , err : & mut Diag < ' _ > | {
1670
1670
match source {
1671
1671
PathSource :: Expr ( Some ( Expr { span, kind : ExprKind :: Call ( _, _) , .. } ) )
1672
1672
| PathSource :: TupleStruct ( span, _) => {
@@ -2699,7 +2699,7 @@ impl<'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
2699
2699
fn suggest_using_enum_variant (
2700
2700
& mut self ,
2701
2701
err : & mut Diag < ' _ > ,
2702
- source : PathSource < ' _ , ' _ > ,
2702
+ source : PathSource < ' _ , ' _ , ' _ > ,
2703
2703
def_id : DefId ,
2704
2704
span : Span ,
2705
2705
) {
@@ -2877,7 +2877,7 @@ impl<'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
2877
2877
pub ( crate ) fn suggest_adding_generic_parameter (
2878
2878
& self ,
2879
2879
path : & [ Segment ] ,
2880
- source : PathSource < ' _ , ' _ > ,
2880
+ source : PathSource < ' _ , ' _ , ' _ > ,
2881
2881
) -> Option < ( Span , & ' static str , String , Applicability ) > {
2882
2882
let ( ident, span) = match path {
2883
2883
[ segment]
0 commit comments