@@ -10,7 +10,6 @@ use crate::ty::visit::{TypeSuperVisitable, TypeVisitable, TypeVisitor};
1010use crate :: ty:: { self , AliasTy , InferConst , Lift , Term , TermKind , Ty , TyCtxt } ;
1111use rustc_hir:: def:: Namespace ;
1212use rustc_span:: source_map:: Spanned ;
13- use rustc_target:: abi:: TyAndLayout ;
1413use rustc_type_ir:: { ConstKind , DebugWithInfcx , InferCtxtLike , WithInfcx } ;
1514
1615use std:: fmt:: { self , Debug } ;
@@ -409,6 +408,8 @@ TrivialLiftImpls! {
409408 u64 ,
410409 :: rustc_hir:: def_id:: DefId ,
411410 :: rustc_hir:: Mutability ,
411+ :: rustc_hir:: Unsafety ,
412+ :: rustc_target:: spec:: abi:: Abi ,
412413 crate :: ty:: ClosureKind ,
413414 crate :: ty:: ParamConst ,
414415 crate :: ty:: ParamTy ,
@@ -423,14 +424,6 @@ TrivialLiftImpls! {
423424TrivialTypeTraversalImpls ! {
424425 crate :: ty:: BoundConstness ,
425426}
426- // For some things about which the type library does not know, or does not
427- // provide any traversal implementations, we need to provide a traversal
428- // implementation and a lift implementation (the former only for TyCtxt<'_>
429- // interners).
430- TrivialTypeTraversalAndLiftImpls ! {
431- :: rustc_hir:: Unsafety ,
432- :: rustc_target:: spec:: abi:: Abi ,
433- }
434427
435428///////////////////////////////////////////////////////////////////////////
436429// Lift implementations
@@ -753,9 +746,3 @@ impl<'tcx> TypeSuperVisitable<TyCtxt<'tcx>> for ty::UnevaluatedConst<'tcx> {
753746 self . args . visit_with ( visitor)
754747 }
755748}
756-
757- impl < ' tcx > TypeVisitable < TyCtxt < ' tcx > > for TyAndLayout < ' tcx , Ty < ' tcx > > {
758- fn visit_with < V : TypeVisitor < TyCtxt < ' tcx > > > ( & self , visitor : & mut V ) -> ControlFlow < V :: BreakTy > {
759- visitor. visit_ty ( self . ty )
760- }
761- }
0 commit comments