Rollup merge of #78841 - LeSeulArtichaut:foldable-derive, r=lcnr

Small cleanup in `TypeFoldable` derive macro

r? ```@lcnr```
This commit is contained in:
Mara Bos 2020-11-08 13:36:23 +01:00 committed by GitHub
commit 2489ff7123
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)?;
}
});