Skip to content

Commit 06217ab

Browse files
committed
---
yaml --- r: 79373 b: refs/heads/try c: c11bfde h: refs/heads/master i: 79371: 55c6529 v: v3
1 parent 2c2e3d5 commit 06217ab

File tree

2 files changed

+11
-20
lines changed

2 files changed

+11
-20
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 3e6de6b7da8ee88bf84b0e217900051334be08da
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 60fba4d7d677ec098e6a43014132fe99f7547363
5-
refs/heads/try: 59e5a564fa1fe4a935f59e3fd3b14e881f62e6bf
5+
refs/heads/try: c11bfdefd04828e4aee6925a01e9491d7258acbf
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/libsyntax/ext/expand.rs

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -342,25 +342,16 @@ pub fn expand_item(extsbox: @mut SyntaxEnv,
342342
fld: @ast_fold,
343343
orig: @fn(@ast::item, @ast_fold) -> Option<@ast::item>)
344344
-> Option<@ast::item> {
345-
// need to do expansion first... it might turn out to be a module.
346-
let maybe_it = match it.node {
347-
ast::item_mac(*) => expand_item_mac(extsbox, cx, it, fld),
348-
_ => Some(it)
349-
};
350-
match maybe_it {
351-
Some(it) => {
352-
match it.node {
353-
ast::item_mod(_) | ast::item_foreign_mod(_) => {
354-
cx.mod_push(it.ident);
355-
let macro_escape = contains_macro_escape(it.attrs);
356-
let result = with_exts_frame!(extsbox,macro_escape,orig(it,fld));
357-
cx.mod_pop();
358-
result
359-
}
360-
_ => orig(it,fld)
361-
}
362-
}
363-
None => None
345+
match it.node {
346+
ast::item_mac(*) => expand_item_mac(extsbox, cx, it, fld),
347+
ast::item_mod(_) | ast::item_foreign_mod(_) => {
348+
cx.mod_push(it.ident);
349+
let macro_escape = contains_macro_escape(it.attrs);
350+
let result = with_exts_frame!(extsbox,macro_escape,orig(it,fld));
351+
cx.mod_pop();
352+
result
353+
},
354+
_ => orig(it,fld)
364355
}
365356
}
366357

0 commit comments

Comments
 (0)