From 5e5cc6749eb16f2820fe291582ded0b035667612 Mon Sep 17 00:00:00 2001 From: Huon Wilson Date: Fri, 5 Dec 2014 01:10:22 -0800 Subject: Slash the ast::Stmt type from 104 to 24 bytes. (on platforms with 64-bit pointers.) The StmtMac variant is rather large and also fairly rare, so let's optimise the common case. --- src/libsyntax/ext/expand.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libsyntax/ext') diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs index f2b6f6bfe16..d2d624fa05e 100644 --- a/src/libsyntax/ext/expand.rs +++ b/src/libsyntax/ext/expand.rs @@ -672,7 +672,7 @@ fn expand_stmt(s: Stmt, fld: &mut MacroExpander) -> SmallVector> { StmtMac(mac, style) => (mac, style), _ => return expand_non_macro_stmt(s, fld) }; - let expanded_stmt = match expand_mac_invoc(mac, s.span, + let expanded_stmt = match expand_mac_invoc(mac.and_then(|m| m), s.span, |r| r.make_stmt(), mark_stmt, fld) { Some(stmt) => stmt, -- cgit 1.4.1-3-g733a5