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> {