Skip to content

Commit 855e0e2

Browse files
committed
---
yaml --- r: 144841 b: refs/heads/try2 c: 8330411 h: refs/heads/master i: 144839: a66f185 v: v3
1 parent 5a36a78 commit 855e0e2

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
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: fddc815adaabb87c23e74c2bce41cddb5d433326
8+
refs/heads/try2: 8330411688b038b95695f9823d3937ad2ebf6152
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/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)