@@ -722,8 +722,7 @@ fn has_late_bound_regions<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
722
722
fn visit_lifetime ( & mut self , lt : & ' tcx hir:: Lifetime ) {
723
723
if self . has_late_bound_regions . is_some ( ) { return }
724
724
725
- let hir_id = self . tcx . hir . node_to_hir_id ( lt. id ) ;
726
- match self . tcx . named_region ( hir_id) {
725
+ match self . tcx . named_region ( lt. hir_id ) {
727
726
Some ( rl:: Region :: Static ) | Some ( rl:: Region :: EarlyBound ( ..) ) => { }
728
727
Some ( rl:: Region :: LateBound ( debruijn, _, _) ) |
729
728
Some ( rl:: Region :: LateBoundAnon ( debruijn, _) )
@@ -750,8 +749,7 @@ fn has_late_bound_regions<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
750
749
for param in & generics. params {
751
750
match param. kind {
752
751
GenericParamKind :: Lifetime { .. } => {
753
- let hir_id = tcx. hir . node_to_hir_id ( param. id ) ;
754
- if tcx. is_late_bound ( hir_id) {
752
+ if tcx. is_late_bound ( param. hir_id ) {
755
753
return Some ( param. span ) ;
756
754
}
757
755
}
@@ -1303,8 +1301,7 @@ fn early_bound_lifetimes_from_generics<'a, 'tcx>(
1303
1301
{
1304
1302
generics. params . iter ( ) . filter ( move |param| match param. kind {
1305
1303
GenericParamKind :: Lifetime { .. } => {
1306
- let hir_id = tcx. hir . node_to_hir_id ( param. id ) ;
1307
- !tcx. is_late_bound ( hir_id)
1304
+ !tcx. is_late_bound ( param. hir_id )
1308
1305
}
1309
1306
_ => false ,
1310
1307
} )
0 commit comments