about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorHuon Wilson <dbau.pp+github@gmail.com>2014-12-05 01:10:22 -0800
committerHuon Wilson <dbau.pp+github@gmail.com>2014-12-29 23:55:25 +1100
commit5e5cc6749eb16f2820fe291582ded0b035667612 (patch)
treea9a5da702c47ff1bf8f9d0436a4452e248cdb2f3 /src/libsyntax/parse
parent06f25b7e99b8e05ba5a90f948a78ab32ea5ec457 (diff)
downloadrust-5e5cc6749eb16f2820fe291582ded0b035667612.tar.gz
rust-5e5cc6749eb16f2820fe291582ded0b035667612.zip
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.
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/parser.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 94b61ba56d2..15b92b2edbf 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -3940,7 +3940,7 @@ impl<'a> Parser<'a> {
                                     expr = Some(
                                         self.mk_mac_expr(span.lo,
                                                          span.hi,
-                                                         m.node));
+                                                         m.and_then(|x| x.node)));
                                 }
                                 _ => {
                                     stmts.push(P(Spanned {