@@ -11,6 +11,7 @@ use rustc_hir::def::Namespace;
11
11
use rustc_span:: source_map:: Spanned ;
12
12
use rustc_target:: abi:: TyAndLayout ;
13
13
use rustc_type_ir:: ConstKind ;
14
+ use rustc_type_ir:: traverse:: TypeTraversable ;
14
15
15
16
use super :: print:: PrettyPrinter ;
16
17
use super :: { GenericArg , GenericArgKind , Pattern , Region } ;
@@ -229,6 +230,7 @@ TrivialTypeTraversalImpls! {
229
230
:: rustc_hir:: def_id:: LocalDefId ,
230
231
:: rustc_hir:: ByRef ,
231
232
:: rustc_hir:: HirId ,
233
+ :: rustc_hir:: RangeEnd ,
232
234
:: rustc_hir:: MatchSource ,
233
235
:: rustc_target:: asm:: InlineAsmRegOrRegClass ,
234
236
crate :: mir:: coverage:: BlockMarkerId ,
@@ -264,6 +266,8 @@ TrivialTypeTraversalImpls! {
264
266
// interners).
265
267
TrivialTypeTraversalAndLiftImpls ! {
266
268
:: rustc_hir:: def_id:: DefId ,
269
+ :: rustc_hir:: Safety ,
270
+ :: rustc_target:: spec:: abi:: Abi ,
267
271
crate :: ty:: ClosureKind ,
268
272
crate :: ty:: ParamConst ,
269
273
crate :: ty:: ParamTy ,
@@ -274,11 +278,6 @@ TrivialTypeTraversalAndLiftImpls! {
274
278
rustc_target:: abi:: Size ,
275
279
}
276
280
277
- TrivialLiftImpls ! {
278
- :: rustc_hir:: Safety ,
279
- :: rustc_target:: spec:: abi:: Abi ,
280
- }
281
-
282
281
///////////////////////////////////////////////////////////////////////////
283
282
// Lift implementations
284
283
@@ -573,7 +572,7 @@ impl<'tcx> TypeSuperFoldable<TyCtxt<'tcx>> for ty::Const<'tcx> {
573
572
ConstKind :: Placeholder ( p) => ConstKind :: Placeholder ( p. try_fold_with ( folder) ?) ,
574
573
ConstKind :: Unevaluated ( uv) => ConstKind :: Unevaluated ( uv. try_fold_with ( folder) ?) ,
575
574
ConstKind :: Value ( t, v) => {
576
- ConstKind :: Value ( t. try_fold_with ( folder) ?, v. try_fold_with ( folder) ?)
575
+ ConstKind :: Value ( t. try_fold_with ( folder) ?, v. noop_try_fold_with ( folder) ?)
577
576
}
578
577
ConstKind :: Error ( e) => ConstKind :: Error ( e. try_fold_with ( folder) ?) ,
579
578
ConstKind :: Expr ( e) => ConstKind :: Expr ( e. try_fold_with ( folder) ?) ,
@@ -644,7 +643,7 @@ impl<'tcx, T: TypeVisitable<TyCtxt<'tcx>> + Debug + Clone> TypeVisitable<TyCtxt<
644
643
{
645
644
fn visit_with < V : TypeVisitor < TyCtxt < ' tcx > > > ( & self , visitor : & mut V ) -> V :: Result {
646
645
try_visit ! ( self . node. visit_with( visitor) ) ;
647
- self . span . visit_with ( visitor)
646
+ self . span . noop_visit_with ( visitor)
648
647
}
649
648
}
650
649
@@ -657,7 +656,7 @@ impl<'tcx, T: TypeFoldable<TyCtxt<'tcx>> + Debug + Clone> TypeFoldable<TyCtxt<'t
657
656
) -> Result < Self , F :: Error > {
658
657
Ok ( Spanned {
659
658
node : self . node . try_fold_with ( folder) ?,
660
- span : self . span . try_fold_with ( folder) ?,
659
+ span : self . span . noop_try_fold_with ( folder) ?,
661
660
} )
662
661
}
663
662
}
0 commit comments