Skip to content

Commit 4e0be2f

Browse files
committed
---
yaml --- r: 47451 b: refs/heads/try c: deaf3fd h: refs/heads/master i: 47449: 06044ba 47447: de34a6b v: v3
1 parent 4009e80 commit 4e0be2f

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
@@ -2,7 +2,7 @@
22
refs/heads/master: 3bbcac322669cff3abde5be937cc4ec3860f3985
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a6d9689399d091c3265f00434a69c551a61c28dc
5-
refs/heads/try: fe08364b3be5463e28650a6ed8cdd203b775208a
5+
refs/heads/try: deaf3fdf6e5f4b0f8c5e0680f06a4d5809a034fb
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: 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 =>

branches/try/src/test/compile-fail/macro-with-seps-err-msg.rs renamed to branches/try/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)