//! `TypeFoldable` implementations for MIR types use rustc_ast::InlineAsmTemplatePiece; use super::*; use crate::ty; TrivialTypeTraversalAndLiftImpls! { BlockTailInfo, MirPhase, SourceInfo, FakeReadCause, RetagKind, SourceScope, SourceScopeLocalData, UserTypeAnnotationIndex, BorrowKind, CastKind, NullOp, hir::Movability, BasicBlock, SwitchTargets, GeneratorKind, GeneratorSavedLocal, } TrivialTypeTraversalImpls! { for <'tcx> { ConstValue<'tcx>, } } impl<'tcx> TypeFoldable<'tcx> for &'tcx [InlineAsmTemplatePiece] { fn try_fold_with>(self, _folder: &mut F) -> Result { Ok(self) } } impl<'tcx> TypeFoldable<'tcx> for &'tcx [Span] { fn try_fold_with>(self, _folder: &mut F) -> Result { Ok(self) } } impl<'tcx> TypeFoldable<'tcx> for &'tcx ty::List> { fn try_fold_with>(self, folder: &mut F) -> Result { ty::util::fold_list(self, folder, |tcx, v| tcx.intern_place_elems(v)) } } impl<'tcx, R: Idx, C: Idx> TypeFoldable<'tcx> for BitMatrix { fn try_fold_with>(self, _: &mut F) -> Result { Ok(self) } }