about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMark Mansi <markm@cs.wisc.edu>2019-05-07 17:58:58 -0500
committerMark Mansi <markm@cs.wisc.edu>2019-05-10 10:18:46 -0500
commit5b6bda33543a8db601690350c585515a5273975d (patch)
treea7fedf5d0dcb43a8bd3b636ab9f0b9a6b39c8ce6 /src
parent0ac53da03dad79655e2f3e65a58f94a2f3314d5f (diff)
downloadrust-5b6bda33543a8db601690350c585515a5273975d.tar.gz
rust-5b6bda33543a8db601690350c585515a5273975d.zip
turn a couple of fixmes into span_bugs
Diffstat (limited to 'src')
-rw-r--r--src/libsyntax/ext/tt/transcribe.rs16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/libsyntax/ext/tt/transcribe.rs b/src/libsyntax/ext/tt/transcribe.rs
index 0cefcf1ce03..e3586c1854c 100644
--- a/src/libsyntax/ext/tt/transcribe.rs
+++ b/src/libsyntax/ext/tt/transcribe.rs
@@ -170,10 +170,9 @@ pub fn transcribe(
                     }
 
                     LockstepIterSize::Contradiction(ref msg) => {
-                        // FIXME: this should be impossible. I (mark-i-m) believe it would
-                        // represent a bug in the macro_parser.
-                        // FIXME #2887 blame macro invoker instead
-                        cx.span_fatal(seq.span(), &msg[..]);
+                        // This should never happen because the macro parser should generate
+                        // properly-sized matches for all meta-vars.
+                        cx.span_bug(seq.span(), &msg[..]);
                     }
 
                     LockstepIterSize::Constraint(len, _) => {
@@ -188,14 +187,13 @@ pub fn transcribe(
                         // Is the repetition empty?
                         if len == 0 {
                             if seq.op == quoted::KleeneOp::OneOrMore {
-                                // FIXME: this should be impossible because we check for this in
-                                // macro_parser.rs
-                                // FIXME #2887 blame invoker
-                                cx.span_fatal(sp.entire(), "this must repeat at least once");
+                                // This should be impossible because the macro parser would not
+                                // match the given macro arm.
+                                cx.span_bug(sp.entire(), "this must repeat at least once");
                             }
                         } else {
                             // 0 is the initial counter (we have done 0 repretitions so far). `len`
-                            //   is the total number of reptitions we should generate.
+                            // is the total number of reptitions we should generate.
                             repeats.push((0, len));
 
                             // The first time we encounter the sequence we push it to the stack. It