Skip to content

Commit d3958bf

Browse files
committed
---
yaml --- r: 44947 b: refs/heads/master c: deaf3fd h: refs/heads/master i: 44945: b5aab71 44943: 7e70bce v: v3
1 parent f827915 commit d3958bf

File tree

3 files changed

+12
-18
lines changed

3 files changed

+12
-18
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: fe08364b3be5463e28650a6ed8cdd203b775208a
2+
refs/heads/master: deaf3fdf6e5f4b0f8c5e0680f06a4d5809a034fb
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a6d9689399d091c3265f00434a69c551a61c28dc
55
refs/heads/try: ef355f6332f83371e4acf04fc4eb940ab41d78d3

trunk/src/libsyntax/ext/expand.rs

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,10 @@ pub fn expand_expr(extsbox: @mut SyntaxEnv,
3838
// entry-point for all syntax extensions.
3939
expr_mac(ref mac) => {
4040
match (*mac).node {
41-
// Token-tree macros:
41+
// Token-tree macros, these will be the only case when we're
42+
// finished transitioning.
4243
mac_invoc_tt(pth, ref tts) => {
43-
if (pth.idents.len() > 1u) {
44-
cx.span_fatal(
45-
pth.span,
46-
fmt!("expected macro name without module \
47-
separators"));
48-
}
44+
assert (vec::len(pth.idents) == 1u);
4945
/* using idents and token::special_idents would make the
5046
the macro names be hygienic */
5147
let extname = cx.parse_sess().interner.get(pth.idents[0]);
@@ -324,12 +320,8 @@ pub fn expand_stmt(extsbox: @mut SyntaxEnv,
324320
}
325321
_ => return orig(s, sp, fld)
326322
};
327-
if (pth.idents.len() > 1u) {
328-
cx.span_fatal(
329-
pth.span,
330-
fmt!("expected macro name without module \
331-
separators"));
332-
}
323+
324+
assert(vec::len(pth.idents) == 1u);
333325
let extname = cx.parse_sess().interner.get(pth.idents[0]);
334326
let (fully_expanded, sp) = match (*extsbox).find(&extname) {
335327
None =>

trunk/src/test/compile-fail/macro-with-seps-err-msg.rs renamed to trunk/src/test/run-pass/issue-4448.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// error-pattern:expected macro name without module separators
12-
1311
fn main() {
14-
globnar::brotz!();
15-
}
12+
let (port, chan) = comm::stream::<&static/str>();
1613

14+
do task::spawn {
15+
assert port.recv() == "hello, world";
16+
}
1717

18+
chan.send("hello, world");
19+
}

0 commit comments

Comments
 (0)