From 087a9340d5920d7b9c32433bbc5c75cd8764ed32 Mon Sep 17 00:00:00 2001 From: LeSeulArtichaut Date: Sat, 7 Nov 2020 18:20:42 +0100 Subject: [PATCH] Small cleanup in `TypeFoldable` derive macro --- compiler/rustc_macros/src/type_foldable.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/compiler/rustc_macros/src/type_foldable.rs b/compiler/rustc_macros/src/type_foldable.rs index b16e22e8d77e8..8fa6e6a710108 100644 --- a/compiler/rustc_macros/src/type_foldable.rs +++ b/compiler/rustc_macros/src/type_foldable.rs @@ -16,9 +16,8 @@ pub fn type_foldable_derive(mut s: synstructure::Structure<'_>) -> proc_macro2:: }) }); - let body_visit = s.fold(quote!(), |acc, bind| { + let body_visit = s.each(|bind| { quote! { - #acc ::rustc_middle::ty::fold::TypeFoldable::visit_with(#bind, __folder)?; } });