From 08479aabd03d576e4b2050cd4733e75a2b932f80 Mon Sep 17 00:00:00 2001 From: Mark Mansi Date: Tue, 5 Jun 2018 19:24:10 -0500 Subject: [PATCH] enable fold_mac --- src/librustc_allocator/expand.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/librustc_allocator/expand.rs b/src/librustc_allocator/expand.rs index 5c9bf99d15cf..547d5f26cf84 100644 --- a/src/librustc_allocator/expand.rs +++ b/src/librustc_allocator/expand.rs @@ -13,7 +13,7 @@ use rustc_errors; use syntax::{ ast::{ self, Arg, Attribute, Crate, Expr, FnHeader, Generics, Ident, Item, ItemKind, - LitKind, Mod, Mutability, StrStyle, Ty, TyKind, Unsafety, VisibilityKind, + LitKind, Mac, Mod, Mutability, StrStyle, Ty, TyKind, Unsafety, VisibilityKind, }, attr, codemap::{ @@ -167,6 +167,11 @@ impl<'a> Folder for ExpandAllocatorDirectives<'a> { info!("exit submodule"); ret } + + // `fold_mac` is disabled by default. Enable it here. + fn fold_mac(&mut self, mac: Mac) -> Mac { + fold::noop_fold_mac(mac, self) + } } struct AllocFnFactory<'a> {