about summary refs log tree commit diff
path: root/src/libsyntax/feature_gate.rs
diff options
context:
space:
mode:
authorMark Mansi <markm@cs.wisc.edu>2018-01-26 16:16:43 -0600
committerMark Mansi <markm@cs.wisc.edu>2018-01-30 12:42:51 -0600
commit3c15405c2571e03226b98f2d6eddec51967f0a18 (patch)
tree544446df2609b2afcaa16ec39e6d6cd8b369c464 /src/libsyntax/feature_gate.rs
parent4897a05ebf862f694f8b276e6c540ba30af4326a (diff)
downloadrust-3c15405c2571e03226b98f2d6eddec51967f0a18.tar.gz
rust-3c15405c2571e03226b98f2d6eddec51967f0a18.zip
Add feature gate + tests
Diffstat (limited to 'src/libsyntax/feature_gate.rs')
-rw-r--r--src/libsyntax/feature_gate.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs
index 9a2560b0458..9358511018a 100644
--- a/src/libsyntax/feature_gate.rs
+++ b/src/libsyntax/feature_gate.rs
@@ -452,6 +452,11 @@ declare_features! (
 
     // Allows `#[repr(transparent)]` attribute on newtype structs
     (active, repr_transparent, "1.25.0", Some(43036)),
+
+    // Use `?` as the Kleene "at most one" operator
+    // FIXME(mark-i-m): make sure we use the correct issue number when there is
+    //   a tracking issue...
+    (active, macro_at_most_once_rep, "1.25.0", None),
 );
 
 declare_features! (
@@ -1250,6 +1255,9 @@ pub const EXPLAIN_PLACEMENT_IN: &'static str =
 pub const EXPLAIN_UNSIZED_TUPLE_COERCION: &'static str =
     "Unsized tuple coercion is not stable enough for use and is subject to change";
 
+pub const EXPLAIN_MACRO_AT_MOST_ONCE_REP: &'static str =
+    "Using the `?` macro Kleene operator for \"at most one\" repetition is unstable";
+
 struct PostExpansionVisitor<'a> {
     context: &'a Context<'a>,
 }