about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-03-14 23:43:04 +0000
committerbors <bors@rust-lang.org>2018-03-14 23:43:04 +0000
commit5ebf74851d685f75abec7ef4e805f75fc301460c (patch)
tree226dc784417a299554cc1ce7748f51d49797a2de /src/libsyntax
parent521d91c6be76367d966df419677dd187f799b116 (diff)
parenta8a0c691914b72d1ca54057914b4cee2bd097ae3 (diff)
downloadrust-5ebf74851d685f75abec7ef4e805f75fc301460c.tar.gz
rust-5ebf74851d685f75abec7ef4e805f75fc301460c.zip
Auto merge of #47630 - canndrew:exhaustive-patterns, r=nikomatsakis
Stabilise feature(never_type). Introduce feature(exhaustive_patterns)

This stabilizes `!`, removing the feature gate as well as the old defaulting-to-`()` behavior. The pattern exhaustiveness checks which were covered by `feature(never_type)` have been moved behind a new `feature(exhaustive_patterns)` gate.
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/feature_gate.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs
index ec9a15d9f2b..91364fe6ed4 100644
--- a/src/libsyntax/feature_gate.rs
+++ b/src/libsyntax/feature_gate.rs
@@ -286,8 +286,8 @@ declare_features! (
     // Allows `impl Trait` in function arguments.
     (active, universal_impl_trait, "1.23.0", Some(34511), None),
 
-    // The `!` type
-    (active, never_type, "1.13.0", Some(35121), None),
+    // Allows exhaustive pattern matching on types that contain uninhabited types.
+    (active, exhaustive_patterns, "1.13.0", None, None),
 
     // Allows all literals in attribute lists and values of key-value pairs.
     (active, attr_literals, "1.13.0", Some(34981), None),
@@ -1566,10 +1566,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
             ast::TyKind::BareFn(ref bare_fn_ty) => {
                 self.check_abi(bare_fn_ty.abi, ty.span);
             }
-            ast::TyKind::Never => {
-                gate_feature_post!(&self, never_type, ty.span,
-                                   "The `!` type is experimental");
-            },
             ast::TyKind::TraitObject(_, ast::TraitObjectSyntax::Dyn) => {
                 gate_feature_post!(&self, dyn_trait, ty.span,
                                    "`dyn Trait` syntax is unstable");