@@ -2473,7 +2473,7 @@ impl<'tcx> TyCtxt<'tcx> {
2473
2473
// FIXME consider asking the input slice to be sorted to avoid
2474
2474
// re-interning permutations, in which case that would be asserted
2475
2475
// here.
2476
- if preds. len ( ) == 0 {
2476
+ if preds. is_empty ( ) {
2477
2477
// The macro-generated method below asserts we don't intern an empty slice.
2478
2478
List :: empty ( )
2479
2479
} else {
@@ -2482,31 +2482,31 @@ impl<'tcx> TyCtxt<'tcx> {
2482
2482
}
2483
2483
2484
2484
pub fn intern_type_list ( self , ts : & [ Ty < ' tcx > ] ) -> & ' tcx List < Ty < ' tcx > > {
2485
- if ts. len ( ) == 0 { List :: empty ( ) } else { self . _intern_type_list ( ts) }
2485
+ if ts. is_empty ( ) { List :: empty ( ) } else { self . _intern_type_list ( ts) }
2486
2486
}
2487
2487
2488
2488
pub fn intern_substs ( self , ts : & [ GenericArg < ' tcx > ] ) -> & ' tcx List < GenericArg < ' tcx > > {
2489
- if ts. len ( ) == 0 { List :: empty ( ) } else { self . _intern_substs ( ts) }
2489
+ if ts. is_empty ( ) { List :: empty ( ) } else { self . _intern_substs ( ts) }
2490
2490
}
2491
2491
2492
2492
pub fn intern_projs ( self , ps : & [ ProjectionKind ] ) -> & ' tcx List < ProjectionKind > {
2493
- if ps. len ( ) == 0 { List :: empty ( ) } else { self . _intern_projs ( ps) }
2493
+ if ps. is_empty ( ) { List :: empty ( ) } else { self . _intern_projs ( ps) }
2494
2494
}
2495
2495
2496
2496
pub fn intern_place_elems ( self , ts : & [ PlaceElem < ' tcx > ] ) -> & ' tcx List < PlaceElem < ' tcx > > {
2497
- if ts. len ( ) == 0 { List :: empty ( ) } else { self . _intern_place_elems ( ts) }
2497
+ if ts. is_empty ( ) { List :: empty ( ) } else { self . _intern_place_elems ( ts) }
2498
2498
}
2499
2499
2500
2500
pub fn intern_canonical_var_infos ( self , ts : & [ CanonicalVarInfo ] ) -> CanonicalVarInfos < ' tcx > {
2501
- if ts. len ( ) == 0 { List :: empty ( ) } else { self . _intern_canonical_var_infos ( ts) }
2501
+ if ts. is_empty ( ) { List :: empty ( ) } else { self . _intern_canonical_var_infos ( ts) }
2502
2502
}
2503
2503
2504
2504
pub fn intern_clauses ( self , ts : & [ Clause < ' tcx > ] ) -> Clauses < ' tcx > {
2505
- if ts. len ( ) == 0 { List :: empty ( ) } else { self . _intern_clauses ( ts) }
2505
+ if ts. is_empty ( ) { List :: empty ( ) } else { self . _intern_clauses ( ts) }
2506
2506
}
2507
2507
2508
2508
pub fn intern_goals ( self , ts : & [ Goal < ' tcx > ] ) -> Goals < ' tcx > {
2509
- if ts. len ( ) == 0 { List :: empty ( ) } else { self . _intern_goals ( ts) }
2509
+ if ts. is_empty ( ) { List :: empty ( ) } else { self . _intern_goals ( ts) }
2510
2510
}
2511
2511
2512
2512
pub fn mk_fn_sig < I > (
0 commit comments