about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-03-28 15:31:29 +0000
committerbors <bors@rust-lang.org>2018-03-28 15:31:29 +0000
commit1169541e173965531de77c15316e83962a7ae39b (patch)
tree0091bc5b94b55ee6354075fb4b01d186b3947d9a /src/libsyntax
parentd87c19db6df9189a2beb43e7998d0cc5548878b3 (diff)
parent3c65f536206a4df9900f5f6666f3674817d3638b (diff)
downloadrust-1169541e173965531de77c15316e83962a7ae39b.tar.gz
rust-1169541e173965531de77c15316e83962a7ae39b.zip
Auto merge of #49394 - cramertj:stable-match-bindings, r=nikomatsakis
Stabilize match_default_bindings

This includes a submodule update to rustfmt
in order to allow a stable feature declaration.

r? @nikomatsakis

cc https://github.com/rust-lang/rust/issues/42640

Many of the tests this PR touches are merely testing the current lack of desired future behavior around https://github.com/rust-lang/rust/issues/44849 and https://github.com/rust-lang/rust/issues/44848 (cc @tschottdorf). I noticed the bullets for those items were checked on the tracking issue-- I've unchecked them, as they don't appear to have been completed and I don't see any comments indicating that we don't want to pursue them further. Still, I think it's fine to stabilize the current behavior, as I think expanding it in the future should be backwards-compatible.
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/feature_gate.rs5
-rw-r--r--src/libsyntax/lib.rs2
2 files changed, 3 insertions, 4 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs
index 4e3c77d5e46..ce8c613dc8b 100644
--- a/src/libsyntax/feature_gate.rs
+++ b/src/libsyntax/feature_gate.rs
@@ -385,9 +385,6 @@ declare_features! (
     // allow `'_` placeholder lifetimes
     (active, underscore_lifetimes, "1.22.0", Some(44524), None),
 
-    // Default match binding modes (RFC 2005)
-    (active, match_default_bindings, "1.22.0", Some(42640), None),
-
     // Trait object syntax with `dyn` prefix
     (active, dyn_trait, "1.22.0", Some(44662), Some(Edition::Edition2018)),
 
@@ -563,6 +560,8 @@ declare_features! (
     (accepted, conservative_impl_trait, "1.26.0", Some(34511), None),
     // The `i128` type
     (accepted, i128_type, "1.26.0", Some(35118), None),
+    // Default match binding modes (RFC 2005)
+    (accepted, match_default_bindings, "1.26.0", Some(42640), None),
 );
 
 // If you change this, please modify src/doc/unstable-book as well. You must
diff --git a/src/libsyntax/lib.rs b/src/libsyntax/lib.rs
index 2218b396685..dc349c1a3e6 100644
--- a/src/libsyntax/lib.rs
+++ b/src/libsyntax/lib.rs
@@ -22,7 +22,7 @@
 
 #![feature(unicode)]
 #![feature(rustc_diagnostic_macros)]
-#![feature(match_default_bindings)]
+#![cfg_attr(stage0, feature(match_default_bindings))]
 #![feature(non_exhaustive)]
 #![cfg_attr(stage0, feature(i128_type))]
 #![feature(const_atomic_usize_new)]