about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeSeulArtichaut <leseulartichaut@gmail.com>2020-11-07 18:20:42 +0100
committerLeSeulArtichaut <leseulartichaut@gmail.com>2020-11-07 18:20:42 +0100
commit087a9340d5920d7b9c32433bbc5c75cd8764ed32 (patch)
tree0151eb73431ec9410b75c9217e7099fa438d2f85
parent0256d065d4901b63def6c04013da4f781d0752bb (diff)
downloadrust-087a9340d5920d7b9c32433bbc5c75cd8764ed32.tar.gz
rust-087a9340d5920d7b9c32433bbc5c75cd8764ed32.zip
Small cleanup in `TypeFoldable` derive macro
-rw-r--r--compiler/rustc_macros/src/type_foldable.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_macros/src/type_foldable.rs b/compiler/rustc_macros/src/type_foldable.rs
index b16e22e8d77..8fa6e6a7101 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)?;
         }
     });