From cf94bdc0742c13e2a0cac864c478b8626b266e1b Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:11:38 +0200 Subject: Merging upstream version 1.66.0+dfsg1. Signed-off-by: Daniel Baumann --- compiler/rustc_middle/src/macros.rs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'compiler/rustc_middle/src/macros.rs') diff --git a/compiler/rustc_middle/src/macros.rs b/compiler/rustc_middle/src/macros.rs index 0e85c60a3..01fe72de6 100644 --- a/compiler/rustc_middle/src/macros.rs +++ b/compiler/rustc_middle/src/macros.rs @@ -54,13 +54,22 @@ macro_rules! TrivialTypeTraversalImpls { impl<$tcx> $crate::ty::fold::TypeFoldable<$tcx> for $ty { fn try_fold_with>( self, - _: &mut F - ) -> ::std::result::Result<$ty, F::Error> { + _: &mut F, + ) -> ::std::result::Result { Ok(self) } + + #[inline] + fn fold_with>( + self, + _: &mut F, + ) -> Self { + self + } } impl<$tcx> $crate::ty::visit::TypeVisitable<$tcx> for $ty { + #[inline] fn visit_with>( &self, _: &mut F) -- cgit v1.2.3