@@ -2473,7 +2473,7 @@ impl<'tcx> TyCtxt<'tcx> {
24732473 // FIXME consider asking the input slice to be sorted to avoid
24742474 // re-interning permutations, in which case that would be asserted
24752475 // here.
2476- if preds. len ( ) == 0 {
2476+ if preds. is_empty ( ) {
24772477 // The macro-generated method below asserts we don't intern an empty slice.
24782478 List :: empty ( )
24792479 } else {
@@ -2482,31 +2482,31 @@ impl<'tcx> TyCtxt<'tcx> {
24822482 }
24832483
24842484 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) }
24862486 }
24872487
24882488 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) }
24902490 }
24912491
24922492 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) }
24942494 }
24952495
24962496 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) }
24982498 }
24992499
25002500 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) }
25022502 }
25032503
25042504 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) }
25062506 }
25072507
25082508 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) }
25102510 }
25112511
25122512 pub fn mk_fn_sig < I > (
0 commit comments