From 2e00214b3efbdfeefaa0fe9e8b8fd519de7adc35 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:50 +0200 Subject: Merging upstream version 1.69.0+dfsg1. Signed-off-by: Daniel Baumann --- compiler/rustc_middle/src/mir/type_foldable.rs | 29 ++++++++++++++------------ 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'compiler/rustc_middle/src/mir/type_foldable.rs') diff --git a/compiler/rustc_middle/src/mir/type_foldable.rs b/compiler/rustc_middle/src/mir/type_foldable.rs index 0705b4cff..988158321 100644 --- a/compiler/rustc_middle/src/mir/type_foldable.rs +++ b/compiler/rustc_middle/src/mir/type_foldable.rs @@ -30,26 +30,29 @@ TrivialTypeTraversalImpls! { } } -impl<'tcx> TypeFoldable<'tcx> for &'tcx [InlineAsmTemplatePiece] { - fn try_fold_with>(self, _folder: &mut F) -> Result { +impl<'tcx> TypeFoldable> 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 { +impl<'tcx> TypeFoldable> 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) +impl<'tcx> TypeFoldable> for &'tcx ty::List> { + fn try_fold_with>>( + self, + folder: &mut F, + ) -> Result { + ty::util::fold_list(self, folder, |tcx, v| tcx.mk_place_elems(v)) } } -- cgit v1.2.3