@@ -1597,7 +1597,7 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> {
15971597 if let Some ( & ( _, res) ) = rib. bindings . get ( & normalized_ident) {
15981598 self . record_lifetime_res ( lifetime. id , res, LifetimeElisionCandidate :: Named ) ;
15991599
1600- if let LifetimeRes :: Param { param, binder } = res {
1600+ if let LifetimeRes :: Param { param : ( param , _ ) , binder } = res {
16011601 match self . lifetime_uses . entry ( param) {
16021602 Entry :: Vacant ( v) => {
16031603 debug ! ( "First use of {:?} at {:?}" , res, ident. span) ;
@@ -2065,7 +2065,7 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> {
20652065 }
20662066
20672067 match candidate {
2068- LifetimeElisionCandidate :: Missing ( missing) => {
2068+ LifetimeElisionCandidate :: Missing ( missing @ MissingLifetime { span : elided , .. } ) => {
20692069 debug_assert_eq ! ( id, missing. id) ;
20702070 match res {
20712071 LifetimeRes :: Static => {
@@ -2074,11 +2074,11 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> {
20742074 lint:: builtin:: ELIDED_NAMED_LIFETIMES ,
20752075 missing. id_if_not_fake_or ( self . crate_node_id ) ,
20762076 missing. span ,
2077- BuiltinLintDiag :: ElidedIsStatic { elided : missing . span } ,
2077+ BuiltinLintDiag :: ElidedIsStatic { elided } ,
20782078 ) ;
20792079 }
20802080 }
2081- LifetimeRes :: Param { param, binder } => {
2081+ LifetimeRes :: Param { param : ( _ , param ) , binder } => {
20822082 self . r . lint_buffer . buffer_lint (
20832083 lint:: builtin:: ELIDED_NAMED_LIFETIMES ,
20842084 // 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> {
20882088 // we would have to do some additional work.
20892089 missing. id_if_not_fake_or ( binder) ,
20902090 missing. span ,
2091- BuiltinLintDiag :: ElidedIsParam {
2092- elided : missing. span ,
2093- param : self . r . tcx ( ) . source_span ( param) ,
2094- } ,
2091+ BuiltinLintDiag :: ElidedIsParam { elided, param } ,
20952092 ) ;
20962093 }
20972094 LifetimeRes :: Fresh { .. }
@@ -2826,7 +2823,7 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> {
28262823 ( & mut function_value_rib, DefKind :: ConstParam )
28272824 }
28282825 GenericParamKind :: Lifetime => {
2829- let res = LifetimeRes :: Param { param : def_id, binder } ;
2826+ let res = LifetimeRes :: Param { param : ( def_id, param . ident ) , binder } ;
28302827 self . record_lifetime_param ( param. id , res) ;
28312828 function_lifetime_rib. bindings . insert ( ident, ( param. id , res) ) ;
28322829 continue ;
0 commit comments