|
4 | 4 | //! to help with the tedium.
|
5 | 5 |
|
6 | 6 | use crate::mir::interpret;
|
7 |
| -use crate::mir::ProjectionKind; |
8 | 7 | use crate::ty::fold::{FallibleTypeFolder, TypeFoldable, TypeSuperFoldable};
|
9 | 8 | use crate::ty::print::{with_no_trimmed_paths, FmtPrinter, Printer};
|
10 | 9 | use crate::ty::visit::{TypeSuperVisitable, TypeVisitable, TypeVisitor};
|
@@ -373,16 +372,6 @@ impl<'a, 'tcx> Lift<'tcx> for ty::ParamEnv<'a> {
|
373 | 372 | ///////////////////////////////////////////////////////////////////////////
|
374 | 373 | // Traversal implementations.
|
375 | 374 |
|
376 |
| -/// AdtDefs are basically the same as a DefId. |
377 |
| -impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for ty::AdtDef<'tcx> { |
378 |
| - fn try_fold_with<F: FallibleTypeFolder<TyCtxt<'tcx>>>( |
379 |
| - self, |
380 |
| - _folder: &mut F, |
381 |
| - ) -> Result<Self, F::Error> { |
382 |
| - Ok(self) |
383 |
| - } |
384 |
| -} |
385 |
| - |
386 | 375 | impl<'tcx> TypeVisitable<TyCtxt<'tcx>> for ty::AdtDef<'tcx> {
|
387 | 376 | fn visit_with<V: TypeVisitor<TyCtxt<'tcx>>>(
|
388 | 377 | &self,
|
@@ -445,15 +434,6 @@ impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for &'tcx ty::List<ty::Const<'tcx>> {
|
445 | 434 | }
|
446 | 435 | }
|
447 | 436 |
|
448 |
| -impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for &'tcx ty::List<ProjectionKind> { |
449 |
| - fn try_fold_with<F: FallibleTypeFolder<TyCtxt<'tcx>>>( |
450 |
| - self, |
451 |
| - folder: &mut F, |
452 |
| - ) -> Result<Self, F::Error> { |
453 |
| - ty::util::fold_list(self, folder, |tcx, v| tcx.mk_projs(v)) |
454 |
| - } |
455 |
| -} |
456 |
| - |
457 | 437 | impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for Ty<'tcx> {
|
458 | 438 | fn try_fold_with<F: FallibleTypeFolder<TyCtxt<'tcx>>>(
|
459 | 439 | self,
|
|
0 commit comments