@@ -100,10 +100,7 @@ use rustc_middle::mir::ConstantKind;
100
100
use rustc_middle:: ty as rustc_ty;
101
101
use rustc_middle:: ty:: adjustment:: { Adjust , Adjustment , AutoBorrow } ;
102
102
use rustc_middle:: ty:: binding:: BindingMode ;
103
- use rustc_middle:: ty:: fast_reject:: SimplifiedType :: {
104
- ArraySimplifiedType , BoolSimplifiedType , CharSimplifiedType , FloatSimplifiedType , IntSimplifiedType ,
105
- PtrSimplifiedType , SliceSimplifiedType , StrSimplifiedType , UintSimplifiedType ,
106
- } ;
103
+ use rustc_middle:: ty:: fast_reject:: SimplifiedType ;
107
104
use rustc_middle:: ty:: layout:: IntegerExt ;
108
105
use rustc_middle:: ty:: {
109
106
BorrowKind , ClosureKind , FloatTy , IntTy , Ty , TyCtxt , TypeAndMut , TypeVisitableExt , UintTy , UpvarCapture ,
@@ -512,30 +509,30 @@ pub fn path_def_id<'tcx>(cx: &LateContext<'_>, maybe_path: &impl MaybePath<'tcx>
512
509
513
510
fn find_primitive_impls < ' tcx > ( tcx : TyCtxt < ' tcx > , name : & str ) -> impl Iterator < Item = DefId > + ' tcx {
514
511
let ty = match name {
515
- "bool" => BoolSimplifiedType ,
516
- "char" => CharSimplifiedType ,
517
- "str" => StrSimplifiedType ,
518
- "array" => ArraySimplifiedType ,
519
- "slice" => SliceSimplifiedType ,
512
+ "bool" => SimplifiedType :: Bool ,
513
+ "char" => SimplifiedType :: Char ,
514
+ "str" => SimplifiedType :: Str ,
515
+ "array" => SimplifiedType :: Array ,
516
+ "slice" => SimplifiedType :: Slice ,
520
517
// FIXME: rustdoc documents these two using just `pointer`.
521
518
//
522
519
// Maybe this is something we should do here too.
523
- "const_ptr" => PtrSimplifiedType ( Mutability :: Not ) ,
524
- "mut_ptr" => PtrSimplifiedType ( Mutability :: Mut ) ,
525
- "isize" => IntSimplifiedType ( IntTy :: Isize ) ,
526
- "i8" => IntSimplifiedType ( IntTy :: I8 ) ,
527
- "i16" => IntSimplifiedType ( IntTy :: I16 ) ,
528
- "i32" => IntSimplifiedType ( IntTy :: I32 ) ,
529
- "i64" => IntSimplifiedType ( IntTy :: I64 ) ,
530
- "i128" => IntSimplifiedType ( IntTy :: I128 ) ,
531
- "usize" => UintSimplifiedType ( UintTy :: Usize ) ,
532
- "u8" => UintSimplifiedType ( UintTy :: U8 ) ,
533
- "u16" => UintSimplifiedType ( UintTy :: U16 ) ,
534
- "u32" => UintSimplifiedType ( UintTy :: U32 ) ,
535
- "u64" => UintSimplifiedType ( UintTy :: U64 ) ,
536
- "u128" => UintSimplifiedType ( UintTy :: U128 ) ,
537
- "f32" => FloatSimplifiedType ( FloatTy :: F32 ) ,
538
- "f64" => FloatSimplifiedType ( FloatTy :: F64 ) ,
520
+ "const_ptr" => SimplifiedType :: Ptr ( Mutability :: Not ) ,
521
+ "mut_ptr" => SimplifiedType :: Ptr ( Mutability :: Mut ) ,
522
+ "isize" => SimplifiedType :: Int ( IntTy :: Isize ) ,
523
+ "i8" => SimplifiedType :: Int ( IntTy :: I8 ) ,
524
+ "i16" => SimplifiedType :: Int ( IntTy :: I16 ) ,
525
+ "i32" => SimplifiedType :: Int ( IntTy :: I32 ) ,
526
+ "i64" => SimplifiedType :: Int ( IntTy :: I64 ) ,
527
+ "i128" => SimplifiedType :: Int ( IntTy :: I128 ) ,
528
+ "usize" => SimplifiedType :: Uint ( UintTy :: Usize ) ,
529
+ "u8" => SimplifiedType :: Uint ( UintTy :: U8 ) ,
530
+ "u16" => SimplifiedType :: Uint ( UintTy :: U16 ) ,
531
+ "u32" => SimplifiedType :: Uint ( UintTy :: U32 ) ,
532
+ "u64" => SimplifiedType :: Uint ( UintTy :: U64 ) ,
533
+ "u128" => SimplifiedType :: Uint ( UintTy :: U128 ) ,
534
+ "f32" => SimplifiedType :: Float ( FloatTy :: F32 ) ,
535
+ "f64" => SimplifiedType :: Float ( FloatTy :: F64 ) ,
539
536
_ => return [ ] . iter ( ) . copied ( ) ,
540
537
} ;
541
538
0 commit comments