Skip to content

Commit 4f58db4

Browse files
committed
Make ICE an error and use a sensible error message
1 parent 610d1e3 commit 4f58db4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libsyntax/ext/tt/macro_rules.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,8 +302,8 @@ fn check_lhs_nt_follows(cx: &mut ExtCtxt, lhs: &NamedMatch, sp: Span) {
302302
tt @ &TtSequence(..) => {
303303
check_matcher(cx, Some(tt).into_iter(), &Eof);
304304
},
305-
_ => cx.span_bug(sp, "wrong-structured lhs for follow check (didn't find \
306-
a TtDelimited or TtSequence)")
305+
_ => cx.span_err(sp, "Invalid macro matcher; matchers must be contained \
306+
in balanced delimiters or a repetition indicator")
307307
},
308308
_ => cx.span_bug(sp, "wrong-structured lhs for follow check (didn't find a \
309309
MatchedNonterminal)")

0 commit comments

Comments
 (0)