diff options
| author | Nick Cameron <ncameron@mozilla.com> | 2016-10-06 11:36:36 +1300 |
|---|---|---|
| committer | Nick Cameron <ncameron@mozilla.com> | 2016-10-12 08:40:22 +1300 |
| commit | 9bc6d2609233cece91803a8163dc3ba5579dfde8 (patch) | |
| tree | c02ea412e8c99997b845f8babd2f9e828ed26277 /src/libsyntax | |
| parent | 9d4d0da7af77858f268a66ff144134945c880560 (diff) | |
| download | rust-9bc6d2609233cece91803a8163dc3ba5579dfde8.tar.gz rust-9bc6d2609233cece91803a8163dc3ba5579dfde8.zip | |
Stabilise `?`
cc [`?` tracking issue](https://github.com/rust-lang/rust/issues/31436)
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/feature_gate.rs | 8 | ||||
| -rw-r--r-- | src/libsyntax/lib.rs | 2 |
2 files changed, 3 insertions, 7 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index 9eed1d61244..62b88888fc8 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -253,9 +253,6 @@ declare_features! ( // a...b and ...b (active, inclusive_range_syntax, "1.7.0", Some(28237)), - // `expr?` - (active, question_mark, "1.9.0", Some(31436)), - // impl specialization (RFC 1210) (active, specialization, "1.7.0", Some(31844)), @@ -348,6 +345,8 @@ declare_features! ( (accepted, while_let, "1.0.0", None), // Allows `#[deprecated]` attribute (accepted, deprecated, "1.9.0", Some(29935)), + // `expr?` + (accepted, question_mark, "1.14.0", Some(31436)), ); // (changing above list without updating src/doc/reference.md makes @cmr sad) @@ -1072,9 +1071,6 @@ impl<'a> Visitor for PostExpansionVisitor<'a> { e.span, "inclusive range syntax is experimental"); } - ast::ExprKind::Try(..) => { - gate_feature_post!(&self, question_mark, e.span, "the `?` operator is not stable"); - } ast::ExprKind::InPlace(..) => { gate_feature_post!(&self, placement_in_syntax, e.span, EXPLAIN_PLACEMENT_IN); } diff --git a/src/libsyntax/lib.rs b/src/libsyntax/lib.rs index 118ceb17ab4..6e671c9efdc 100644 --- a/src/libsyntax/lib.rs +++ b/src/libsyntax/lib.rs @@ -31,7 +31,7 @@ #![feature(staged_api)] #![feature(str_escape)] #![feature(unicode)] -#![feature(question_mark)] +#![cfg_attr(stage0, feature(question_mark))] #![feature(rustc_diagnostic_macros)] #![feature(specialization)] |
