diff options
| author | kennytm <kennytm@gmail.com> | 2018-04-21 02:48:56 +0800 |
|---|---|---|
| committer | kennytm <kennytm@gmail.com> | 2018-04-21 15:18:13 +0800 |
| commit | 42b6d4653a2ad22be695760aba3514fc64c18d66 (patch) | |
| tree | 9aa20e49c43031804b8cb32ab81c733e299b62b5 | |
| parent | d141fdc3bfce5ab675a0c74b2fd6cf89ac4ef3f8 (diff) | |
| download | rust-42b6d4653a2ad22be695760aba3514fc64c18d66.tar.gz rust-42b6d4653a2ad22be695760aba3514fc64c18d66.zip | |
Add back missing `#![feature(never_type)]`s
| -rw-r--r-- | src/librustc_mir/lib.rs | 1 | ||||
| -rw-r--r-- | src/librustc_typeck/lib.rs | 1 | ||||
| -rw-r--r-- | src/libstd/primitive_docs.rs | 2 | ||||
| -rw-r--r-- | src/test/run-fail/adjust_never.rs | 3 | ||||
| -rw-r--r-- | src/test/run-fail/call-fn-never-arg.rs | 1 | ||||
| -rw-r--r-- | src/test/run-fail/cast-never.rs | 3 | ||||
| -rw-r--r-- | src/test/run-fail/never-associated-type.rs | 2 | ||||
| -rw-r--r-- | src/test/run-fail/never-type-arg.rs | 2 |
8 files changed, 15 insertions, 0 deletions
diff --git a/src/librustc_mir/lib.rs b/src/librustc_mir/lib.rs index de3063a5756..a47b3cacc51 100644 --- a/src/librustc_mir/lib.rs +++ b/src/librustc_mir/lib.rs @@ -33,6 +33,7 @@ Rust MIR: a lowered representation of Rust. Also: an experiment! #![feature(nonzero)] #![feature(inclusive_range_fields)] #![feature(crate_visibility_modifier)] +#![feature(never_type)] #![cfg_attr(stage0, feature(try_trait))] extern crate arena; diff --git a/src/librustc_typeck/lib.rs b/src/librustc_typeck/lib.rs index 4b66939963e..ed0cfe38a7a 100644 --- a/src/librustc_typeck/lib.rs +++ b/src/librustc_typeck/lib.rs @@ -82,6 +82,7 @@ This API is completely unstable and subject to change. #![feature(slice_patterns)] #![feature(slice_sort_by_cached_key)] #![feature(dyn_trait)] +#![feature(never_type)] #[macro_use] extern crate log; #[macro_use] extern crate syntax; diff --git a/src/libstd/primitive_docs.rs b/src/libstd/primitive_docs.rs index ce4bbfffc2e..42bac605511 100644 --- a/src/libstd/primitive_docs.rs +++ b/src/libstd/primitive_docs.rs @@ -79,6 +79,7 @@ mod prim_bool { } /// write: /// /// ``` +/// #![feature(never_type)] /// # fn foo() -> u32 { /// let x: ! = { /// return 123 @@ -155,6 +156,7 @@ mod prim_bool { } /// for example: /// /// ``` +/// #![feature(never_type)] /// # use std::fmt; /// # trait Debug { /// # fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result; diff --git a/src/test/run-fail/adjust_never.rs b/src/test/run-fail/adjust_never.rs index 7a4b5e59eeb..da68dc39f85 100644 --- a/src/test/run-fail/adjust_never.rs +++ b/src/test/run-fail/adjust_never.rs @@ -11,6 +11,9 @@ // Test that a variable of type ! can coerce to another type. // error-pattern:explicit + +#![feature(never_type)] + fn main() { let x: ! = panic!(); let y: u32 = x; diff --git a/src/test/run-fail/call-fn-never-arg.rs b/src/test/run-fail/call-fn-never-arg.rs index 56454586bb9..95101e70db9 100644 --- a/src/test/run-fail/call-fn-never-arg.rs +++ b/src/test/run-fail/call-fn-never-arg.rs @@ -12,6 +12,7 @@ // error-pattern:wowzers! +#![feature(never_type)] #![allow(unreachable_code)] fn foo(x: !) -> ! { diff --git a/src/test/run-fail/cast-never.rs b/src/test/run-fail/cast-never.rs index 0155332c51d..8f7b0c40538 100644 --- a/src/test/run-fail/cast-never.rs +++ b/src/test/run-fail/cast-never.rs @@ -11,6 +11,9 @@ // Test that we can explicitly cast ! to another type // error-pattern:explicit + +#![feature(never_type)] + fn main() { let x: ! = panic!(); let y: u32 = x as u32; diff --git a/src/test/run-fail/never-associated-type.rs b/src/test/run-fail/never-associated-type.rs index d9b8461a1d0..fdd21e08c20 100644 --- a/src/test/run-fail/never-associated-type.rs +++ b/src/test/run-fail/never-associated-type.rs @@ -12,6 +12,8 @@ // error-pattern:kapow! +#![feature(never_type)] + trait Foo { type Wow; diff --git a/src/test/run-fail/never-type-arg.rs b/src/test/run-fail/never-type-arg.rs index 0fe10d43910..826ca3a08c0 100644 --- a/src/test/run-fail/never-type-arg.rs +++ b/src/test/run-fail/never-type-arg.rs @@ -12,6 +12,8 @@ // error-pattern:oh no! +#![feature(never_type)] + struct Wub; impl PartialEq<!> for Wub { |
