about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorMark Mansi <markm@cs.wisc.edu>2018-01-29 16:26:11 -0600
committerMark Mansi <markm@cs.wisc.edu>2018-01-30 12:42:51 -0600
commit3859eca85134d518278f172fb26483e098381047 (patch)
treedfdb91a05d91b8280996694dfd54df9f1d1aac69 /src/libsyntax
parent6943430e6d0ff11db4d99544cef7d480b15385e5 (diff)
downloadrust-3859eca85134d518278f172fb26483e098381047.tar.gz
rust-3859eca85134d518278f172fb26483e098381047.zip
Improved tests + typo fixes + assert
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/ext/tt/quoted.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libsyntax/ext/tt/quoted.rs b/src/libsyntax/ext/tt/quoted.rs
index 8e05a6ccc47..bde1010b523 100644
--- a/src/libsyntax/ext/tt/quoted.rs
+++ b/src/libsyntax/ext/tt/quoted.rs
@@ -396,6 +396,8 @@ where
         // be a `?` separator followed by any Kleene operator. We need to look ahead 1 token to
         // find out which.
         Ok(Ok(op)) => {
+            assert_eq!(op, KleeneOp::ZeroOrOne);
+
             // Lookahead at #2. If it is a KleenOp, then #1 is a separator.
             let is_1_sep = if let Some(&tokenstream::TokenTree::Token(_, ref tok2)) = input.peek() {
                 kleene_op(tok2).is_some()