about summary refs log tree commit diff
path: root/src/libcore
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/libcore
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/libcore')
-rw-r--r--src/libcore/cmp.rs8
-rw-r--r--src/libcore/fmt/mod.rs4
-rw-r--r--src/libcore/lib.rs3
3 files changed, 8 insertions, 7 deletions
diff --git a/src/libcore/cmp.rs b/src/libcore/cmp.rs
index 6602643dc51..67445daa436 100644
--- a/src/libcore/cmp.rs
+++ b/src/libcore/cmp.rs
@@ -882,24 +882,24 @@ mod impls {
 
     ord_impl! { char usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 }
 
-    #[unstable(feature = "never_type", issue = "35121")]
+    #[stable(feature = "never_type", since = "1.26.0")]
     impl PartialEq for ! {
         fn eq(&self, _: &!) -> bool {
             *self
         }
     }
 
-    #[unstable(feature = "never_type", issue = "35121")]
+    #[stable(feature = "never_type", since = "1.26.0")]
     impl Eq for ! {}
 
-    #[unstable(feature = "never_type", issue = "35121")]
+    #[stable(feature = "never_type", since = "1.26.0")]
     impl PartialOrd for ! {
         fn partial_cmp(&self, _: &!) -> Option<Ordering> {
             *self
         }
     }
 
-    #[unstable(feature = "never_type", issue = "35121")]
+    #[stable(feature = "never_type", since = "1.26.0")]
     impl Ord for ! {
         fn cmp(&self, _: &!) -> Ordering {
             *self
diff --git a/src/libcore/fmt/mod.rs b/src/libcore/fmt/mod.rs
index 13db6d5d659..67126b496e2 100644
--- a/src/libcore/fmt/mod.rs
+++ b/src/libcore/fmt/mod.rs
@@ -1711,14 +1711,14 @@ macro_rules! fmt_refs {
 
 fmt_refs! { Debug, Display, Octal, Binary, LowerHex, UpperHex, LowerExp, UpperExp }
 
-#[unstable(feature = "never_type", issue = "35121")]
+#[stable(feature = "never_type", since = "1.26.0")]
 impl Debug for ! {
     fn fmt(&self, _: &mut Formatter) -> Result {
         *self
     }
 }
 
-#[unstable(feature = "never_type", issue = "35121")]
+#[stable(feature = "never_type", since = "1.26.0")]
 impl Display for ! {
     fn fmt(&self, _: &mut Formatter) -> Result {
         *self
diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs
index cefcc5ff03f..a947c9f0b7c 100644
--- a/src/libcore/lib.rs
+++ b/src/libcore/lib.rs
@@ -85,7 +85,7 @@
 #![feature(iterator_repeat_with)]
 #![feature(lang_items)]
 #![feature(link_llvm_intrinsics)]
-#![feature(never_type)]
+#![feature(exhaustive_patterns)]
 #![feature(no_core)]
 #![feature(on_unimplemented)]
 #![feature(optin_builtin_traits)]
@@ -103,6 +103,7 @@
 #![feature(unwind_attributes)]
 
 #![cfg_attr(stage0, allow(unused_attributes))]
+#![cfg_attr(stage0, feature(never_type))]
 
 #[prelude_import]
 #[allow(unused)]