Skip to content

Commit 5b6bda3

Browse files
committed
turn a couple of fixmes into span_bugs
1 parent 0ac53da commit 5b6bda3

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

Diff for: src/libsyntax/ext/tt/transcribe.rs

+7-9
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,9 @@ pub fn transcribe(
170170
}
171171

172172
LockstepIterSize::Contradiction(ref msg) => {
173-
// FIXME: this should be impossible. I (mark-i-m) believe it would
174-
// represent a bug in the macro_parser.
175-
// FIXME #2887 blame macro invoker instead
176-
cx.span_fatal(seq.span(), &msg[..]);
173+
// This should never happen because the macro parser should generate
174+
// properly-sized matches for all meta-vars.
175+
cx.span_bug(seq.span(), &msg[..]);
177176
}
178177

179178
LockstepIterSize::Constraint(len, _) => {
@@ -188,14 +187,13 @@ pub fn transcribe(
188187
// Is the repetition empty?
189188
if len == 0 {
190189
if seq.op == quoted::KleeneOp::OneOrMore {
191-
// FIXME: this should be impossible because we check for this in
192-
// macro_parser.rs
193-
// FIXME #2887 blame invoker
194-
cx.span_fatal(sp.entire(), "this must repeat at least once");
190+
// This should be impossible because the macro parser would not
191+
// match the given macro arm.
192+
cx.span_bug(sp.entire(), "this must repeat at least once");
195193
}
196194
} else {
197195
// 0 is the initial counter (we have done 0 repretitions so far). `len`
198-
// is the total number of reptitions we should generate.
196+
// is the total number of reptitions we should generate.
199197
repeats.push((0, len));
200198

201199
// The first time we encounter the sequence we push it to the stack. It

0 commit comments

Comments
 (0)