Make ICE an error and use a sensible error message
This commit is contained in:
parent
610d1e312f
commit
4f58db485d
1 changed files with 2 additions and 2 deletions
|
|
@ -302,8 +302,8 @@ fn check_lhs_nt_follows(cx: &mut ExtCtxt, lhs: &NamedMatch, sp: Span) {
|
|||
tt @ &TtSequence(..) => {
|
||||
check_matcher(cx, Some(tt).into_iter(), &Eof);
|
||||
},
|
||||
_ => cx.span_bug(sp, "wrong-structured lhs for follow check (didn't find \
|
||||
a TtDelimited or TtSequence)")
|
||||
_ => cx.span_err(sp, "Invalid macro matcher; matchers must be contained \
|
||||
in balanced delimiters or a repetition indicator")
|
||||
},
|
||||
_ => cx.span_bug(sp, "wrong-structured lhs for follow check (didn't find a \
|
||||
MatchedNonterminal)")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue