about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/macros.rs
diff options
context:
space:
mode:
authorAlan Egerton <eggyal@gmail.com>2021-12-01 00:55:57 +0000
committerAlan Egerton <eggyal@gmail.com>2021-12-02 16:14:16 +0000
commitbfc434b6d0e64dab88def4c5282eeb4a294faf76 (patch)
tree82df3c0e564f6e72abdc13b32b39c8a768dbd513 /compiler/rustc_middle/src/macros.rs
parentdb7295fa960a729a4577e0e206f7a3a5a472addb (diff)
downloadrust-bfc434b6d0e64dab88def4c5282eeb4a294faf76.tar.gz
rust-bfc434b6d0e64dab88def4c5282eeb4a294faf76.zip
Reduce boilerplate around infallible folders
Diffstat (limited to 'compiler/rustc_middle/src/macros.rs')
-rw-r--r--compiler/rustc_middle/src/macros.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_middle/src/macros.rs b/compiler/rustc_middle/src/macros.rs
index c0cf265b228..a2f1218650b 100644
--- a/compiler/rustc_middle/src/macros.rs
+++ b/compiler/rustc_middle/src/macros.rs
@@ -52,7 +52,7 @@ macro_rules! TrivialTypeFoldableImpls {
     (for <$tcx:lifetime> { $($ty:ty,)+ }) => {
         $(
             impl<$tcx> $crate::ty::fold::TypeFoldable<$tcx> for $ty {
-                fn super_fold_with<F: $crate::ty::fold::TypeFolder<$tcx>>(
+                fn try_super_fold_with<F: $crate::ty::fold::TypeFolderFallible<$tcx>>(
                     self,
                     _: &mut F
                 ) -> ::std::result::Result<$ty, F::Error> {
@@ -95,7 +95,7 @@ macro_rules! EnumTypeFoldableImpl {
         impl<$($p),*> $crate::ty::fold::TypeFoldable<$tcx> for $s
             $(where $($wc)*)*
         {
-            fn super_fold_with<V: $crate::ty::fold::TypeFolder<$tcx>>(
+            fn try_super_fold_with<V: $crate::ty::fold::TypeFolderFallible<$tcx>>(
                 self,
                 folder: &mut V,
             ) -> ::std::result::Result<Self, V::Error> {
@@ -126,7 +126,7 @@ macro_rules! EnumTypeFoldableImpl {
                 output(
                     $variant ( $($variant_arg),* ) => {
                         $variant (
-                            $($crate::ty::fold::TypeFoldable::fold_with($variant_arg, $folder)?),*
+                            $($crate::ty::fold::TypeFoldable::try_fold_with($variant_arg, $folder)?),*
                         )
                     }
                     $($output)*