@@ -1597,7 +1597,7 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> {
1597
1597
if let Some ( & ( _, res) ) = rib. bindings . get ( & normalized_ident) {
1598
1598
self . record_lifetime_res ( lifetime. id , res, LifetimeElisionCandidate :: Named ) ;
1599
1599
1600
- if let LifetimeRes :: Param { param, binder } = res {
1600
+ if let LifetimeRes :: Param { param : ( param , _ ) , binder } = res {
1601
1601
match self . lifetime_uses . entry ( param) {
1602
1602
Entry :: Vacant ( v) => {
1603
1603
debug ! ( "First use of {:?} at {:?}" , res, ident. span) ;
@@ -2065,7 +2065,7 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> {
2065
2065
}
2066
2066
2067
2067
match candidate {
2068
- LifetimeElisionCandidate :: Missing ( missing) => {
2068
+ LifetimeElisionCandidate :: Missing ( missing @ MissingLifetime { span : elided , .. } ) => {
2069
2069
debug_assert_eq ! ( id, missing. id) ;
2070
2070
match res {
2071
2071
LifetimeRes :: Static => {
@@ -2074,11 +2074,11 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> {
2074
2074
lint:: builtin:: ELIDED_NAMED_LIFETIMES ,
2075
2075
missing. id_if_not_fake_or ( self . crate_node_id ) ,
2076
2076
missing. span ,
2077
- BuiltinLintDiag :: ElidedIsStatic { elided : missing . span } ,
2077
+ BuiltinLintDiag :: ElidedIsStatic { elided } ,
2078
2078
) ;
2079
2079
}
2080
2080
}
2081
- LifetimeRes :: Param { param, binder } => {
2081
+ LifetimeRes :: Param { param : ( _ , param ) , binder } => {
2082
2082
self . r . lint_buffer . buffer_lint (
2083
2083
lint:: builtin:: ELIDED_NAMED_LIFETIMES ,
2084
2084
// It should be possible to use `self.crate_node_id`
@@ -2088,10 +2088,7 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> {
2088
2088
// we would have to do some additional work.
2089
2089
missing. id_if_not_fake_or ( binder) ,
2090
2090
missing. span ,
2091
- BuiltinLintDiag :: ElidedIsParam {
2092
- elided : missing. span ,
2093
- param : self . r . tcx ( ) . source_span ( param) ,
2094
- } ,
2091
+ BuiltinLintDiag :: ElidedIsParam { elided, param } ,
2095
2092
) ;
2096
2093
}
2097
2094
LifetimeRes :: Fresh { .. }
@@ -2826,7 +2823,7 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> {
2826
2823
( & mut function_value_rib, DefKind :: ConstParam )
2827
2824
}
2828
2825
GenericParamKind :: Lifetime => {
2829
- let res = LifetimeRes :: Param { param : def_id, binder } ;
2826
+ let res = LifetimeRes :: Param { param : ( def_id, param . ident ) , binder } ;
2830
2827
self . record_lifetime_param ( param. id , res) ;
2831
2828
function_lifetime_rib. bindings . insert ( ident, ( param. id , res) ) ;
2832
2829
continue ;
0 commit comments