1 //! `TypeFoldable` implementations for MIR types
3 use rustc_ast::InlineAsmTemplatePiece;
8 TrivialTypeTraversalAndLiftImpls! {
16 UserTypeAnnotationIndex,
29 TrivialTypeTraversalImpls! {
35 impl<'tcx> TypeFoldable<'tcx> for &'tcx [InlineAsmTemplatePiece] {
36 fn try_fold_with<F: FallibleTypeFolder<'tcx>>(self, _folder: &mut F) -> Result<Self, F::Error> {
41 impl<'tcx> TypeFoldable<'tcx> for &'tcx [Span] {
42 fn try_fold_with<F: FallibleTypeFolder<'tcx>>(self, _folder: &mut F) -> Result<Self, F::Error> {
47 impl<'tcx> TypeFoldable<'tcx> for &'tcx ty::List<PlaceElem<'tcx>> {
48 fn try_fold_with<F: FallibleTypeFolder<'tcx>>(self, folder: &mut F) -> Result<Self, F::Error> {
49 ty::util::fold_list(self, folder, |tcx, v| tcx.intern_place_elems(v))
53 impl<'tcx, R: Idx, C: Idx> TypeFoldable<'tcx> for BitMatrix<R, C> {
54 fn try_fold_with<F: FallibleTypeFolder<'tcx>>(self, _: &mut F) -> Result<Self, F::Error> {