diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-10-13 03:17:00 +0200 |
|---|---|---|
| committer | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-11-21 14:55:32 +0100 |
| commit | 8f6197f39f7d468dfc5b2bd41dae4769992a2f83 (patch) | |
| tree | 3719895c5a9bed6ef713cb4009161ae9fc3f5305 /src/test | |
| parent | 15c30ddd69d6cc3fffe6d304c6dc968a5ed046f1 (diff) | |
| download | rust-8f6197f39f7d468dfc5b2bd41dae4769992a2f83.tar.gz rust-8f6197f39f7d468dfc5b2bd41dae4769992a2f83.zip | |
Remove `#![feature(never_type)]` from tests.
Also remove `never_type` the feature-gate test.
Diffstat (limited to 'src/test')
101 files changed, 130 insertions, 277 deletions
diff --git a/src/test/codegen/enum-debug-niche-2.rs b/src/test/codegen/enum-debug-niche-2.rs index 0f17976ef49..7e00dc5463f 100644 --- a/src/test/codegen/enum-debug-niche-2.rs +++ b/src/test/codegen/enum-debug-niche-2.rs @@ -12,8 +12,6 @@ // CHECK: {{.*}}DIDerivedType{{.*}}tag: DW_TAG_member,{{.*}}name: "Placeholder",{{.*}}extraData: i64 4294967295{{[,)].*}} // CHECK: {{.*}}DIDerivedType{{.*}}tag: DW_TAG_member,{{.*}}name: "Error",{{.*}}extraData: i64 0{{[,)].*}} -#![feature(never_type)] - #[derive(Copy, Clone)] pub struct Entity { private: std::num::NonZeroU32, diff --git a/src/test/mir-opt/uninhabited-enum.rs b/src/test/mir-opt/uninhabited-enum.rs index 904a9c43c1b..409be8587cf 100644 --- a/src/test/mir-opt/uninhabited-enum.rs +++ b/src/test/mir-opt/uninhabited-enum.rs @@ -1,5 +1,3 @@ -#![feature(never_type)] - pub enum Void {} #[no_mangle] diff --git a/src/test/ui/associated-types/associated-types-ICE-when-projecting-out-of-err.rs b/src/test/ui/associated-types/associated-types-ICE-when-projecting-out-of-err.rs index 707bcac78bf..408e55f8903 100644 --- a/src/test/ui/associated-types/associated-types-ICE-when-projecting-out-of-err.rs +++ b/src/test/ui/associated-types/associated-types-ICE-when-projecting-out-of-err.rs @@ -21,5 +21,5 @@ trait Add<RHS=Self> { fn ice<A>(a: A) { let r = loop {}; r = r + a; - //~^ ERROR the trait bound `(): Add<A>` is not satisfied + //~^ ERROR the trait bound `!: Add<A>` is not satisfied } diff --git a/src/test/ui/associated-types/associated-types-ICE-when-projecting-out-of-err.stderr b/src/test/ui/associated-types/associated-types-ICE-when-projecting-out-of-err.stderr index 8c3463a2832..f85c8a1a515 100644 --- a/src/test/ui/associated-types/associated-types-ICE-when-projecting-out-of-err.stderr +++ b/src/test/ui/associated-types/associated-types-ICE-when-projecting-out-of-err.stderr @@ -1,8 +1,8 @@ -error[E0277]: the trait bound `(): Add<A>` is not satisfied +error[E0277]: the trait bound `!: Add<A>` is not satisfied --> $DIR/associated-types-ICE-when-projecting-out-of-err.rs:23:11 | LL | r = r + a; - | ^ the trait `Add<A>` is not implemented for `()` + | ^ the trait `Add<A>` is not implemented for `!` error: aborting due to previous error diff --git a/src/test/ui/binding/empty-types-in-patterns.rs b/src/test/ui/binding/empty-types-in-patterns.rs index 2b8b1b29df8..facb70d1253 100644 --- a/src/test/ui/binding/empty-types-in-patterns.rs +++ b/src/test/ui/binding/empty-types-in-patterns.rs @@ -1,5 +1,4 @@ // run-pass -#![feature(never_type)] #![feature(exhaustive_patterns)] #![feature(slice_patterns)] #![allow(unreachable_patterns)] diff --git a/src/test/ui/borrowck/assign-never-type.rs b/src/test/ui/borrowck/assign-never-type.rs index 4f30ea14670..52b2e70d159 100644 --- a/src/test/ui/borrowck/assign-never-type.rs +++ b/src/test/ui/borrowck/assign-never-type.rs @@ -2,8 +2,6 @@ // check-pass -#![feature(never_type)] - pub fn main() { loop { match None { diff --git a/src/test/ui/break-while-condition.rs b/src/test/ui/break-while-condition.rs index 6064e6ab002..7aa5682b923 100644 --- a/src/test/ui/break-while-condition.rs +++ b/src/test/ui/break-while-condition.rs @@ -1,5 +1,3 @@ -#![feature(never_type)] - fn main() { // The `if false` expressions are simply to // make sure we don't avoid checking everything diff --git a/src/test/ui/break-while-condition.stderr b/src/test/ui/break-while-condition.stderr index a08edee07ea..bae3b6765e2 100644 --- a/src/test/ui/break-while-condition.stderr +++ b/src/test/ui/break-while-condition.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/break-while-condition.rs:9:20 + --> $DIR/break-while-condition.rs:7:20 | LL | let _: ! = { | ____________________^ @@ -11,7 +11,7 @@ LL | | }; found type `()` error[E0308]: mismatched types - --> $DIR/break-while-condition.rs:16:13 + --> $DIR/break-while-condition.rs:14:13 | LL | / while false { LL | | break @@ -22,7 +22,7 @@ LL | | } found type `()` error[E0308]: mismatched types - --> $DIR/break-while-condition.rs:24:13 + --> $DIR/break-while-condition.rs:22:13 | LL | / while false { LL | | return diff --git a/src/test/ui/coercion/coerce-issue-49593-box-never.rs b/src/test/ui/coercion/coerce-issue-49593-box-never.rs index 5038eb3ebf4..b71c3663a4f 100644 --- a/src/test/ui/coercion/coerce-issue-49593-box-never.rs +++ b/src/test/ui/coercion/coerce-issue-49593-box-never.rs @@ -1,6 +1,5 @@ // check-pass -#![feature(never_type)] #![allow(unreachable_code)] use std::error::Error; diff --git a/src/test/ui/coercion/coerce-to-bang-cast.rs b/src/test/ui/coercion/coerce-to-bang-cast.rs index 8ef19480846..ea1384a1dab 100644 --- a/src/test/ui/coercion/coerce-to-bang-cast.rs +++ b/src/test/ui/coercion/coerce-to-bang-cast.rs @@ -1,5 +1,3 @@ -#![feature(never_type)] - fn foo(x: usize, y: !, z: usize) { } fn cast_a() { diff --git a/src/test/ui/coercion/coerce-to-bang-cast.stderr b/src/test/ui/coercion/coerce-to-bang-cast.stderr index ff30ebc09c6..0e17f32511f 100644 --- a/src/test/ui/coercion/coerce-to-bang-cast.stderr +++ b/src/test/ui/coercion/coerce-to-bang-cast.stderr @@ -1,5 +1,5 @@ error[E0605]: non-primitive cast: `i32` as `!` - --> $DIR/coerce-to-bang-cast.rs:6:13 + --> $DIR/coerce-to-bang-cast.rs:4:13 | LL | let y = {return; 22} as !; | ^^^^^^^^^^^^^^^^^ @@ -7,7 +7,7 @@ LL | let y = {return; 22} as !; = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait error[E0605]: non-primitive cast: `i32` as `!` - --> $DIR/coerce-to-bang-cast.rs:11:13 + --> $DIR/coerce-to-bang-cast.rs:9:13 | LL | let y = 22 as !; | ^^^^^^^ diff --git a/src/test/ui/coercion/coerce-to-bang.rs b/src/test/ui/coercion/coerce-to-bang.rs index 1e06934d09f..d52f79fbb7a 100644 --- a/src/test/ui/coercion/coerce-to-bang.rs +++ b/src/test/ui/coercion/coerce-to-bang.rs @@ -1,5 +1,3 @@ -#![feature(never_type)] - fn foo(x: usize, y: !, z: usize) { } fn call_foo_a() { diff --git a/src/test/ui/coercion/coerce-to-bang.stderr b/src/test/ui/coercion/coerce-to-bang.stderr index a46e97da815..b6fd5bf43ab 100644 --- a/src/test/ui/coercion/coerce-to-bang.stderr +++ b/src/test/ui/coercion/coerce-to-bang.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/coerce-to-bang.rs:6:17 + --> $DIR/coerce-to-bang.rs:4:17 | LL | foo(return, 22, 44); | ^^ expected !, found integer @@ -8,7 +8,7 @@ LL | foo(return, 22, 44); found type `{integer}` error[E0308]: mismatched types - --> $DIR/coerce-to-bang.rs:18:13 + --> $DIR/coerce-to-bang.rs:16:13 | LL | foo(22, 44, return); | ^^ expected !, found integer @@ -17,7 +17,7 @@ LL | foo(22, 44, return); found type `{integer}` error[E0308]: mismatched types - --> $DIR/coerce-to-bang.rs:26:12 + --> $DIR/coerce-to-bang.rs:24:12 | LL | foo(a, b, c); // ... and hence a reference to `a` is expected to diverge. | ^ expected !, found integer @@ -26,7 +26,7 @@ LL | foo(a, b, c); // ... and hence a reference to `a` is expected to diverg found type `{integer}` error[E0308]: mismatched types - --> $DIR/coerce-to-bang.rs:36:12 + --> $DIR/coerce-to-bang.rs:34:12 | LL | foo(a, b, c); | ^ expected !, found integer @@ -35,7 +35,7 @@ LL | foo(a, b, c); found type `{integer}` error[E0308]: mismatched types - --> $DIR/coerce-to-bang.rs:45:12 + --> $DIR/coerce-to-bang.rs:43:12 | LL | foo(a, b, c); | ^ expected !, found integer @@ -44,7 +44,7 @@ LL | foo(a, b, c); found type `{integer}` error[E0308]: mismatched types - --> $DIR/coerce-to-bang.rs:50:21 + --> $DIR/coerce-to-bang.rs:48:21 | LL | let x: [!; 2] = [return, 22]; | ^^^^^^^^^^^^ expected !, found integer @@ -53,7 +53,7 @@ LL | let x: [!; 2] = [return, 22]; found type `[{integer}; 2]` error[E0308]: mismatched types - --> $DIR/coerce-to-bang.rs:55:22 + --> $DIR/coerce-to-bang.rs:53:22 | LL | let x: [!; 2] = [22, return]; | ^^ expected !, found integer @@ -62,7 +62,7 @@ LL | let x: [!; 2] = [22, return]; found type `{integer}` error[E0308]: mismatched types - --> $DIR/coerce-to-bang.rs:60:37 + --> $DIR/coerce-to-bang.rs:58:37 | LL | let x: (usize, !, usize) = (22, 44, 66); | ^^ expected !, found integer @@ -71,7 +71,7 @@ LL | let x: (usize, !, usize) = (22, 44, 66); found type `{integer}` error[E0308]: mismatched types - --> $DIR/coerce-to-bang.rs:65:41 + --> $DIR/coerce-to-bang.rs:63:41 | LL | let x: (usize, !, usize) = (return, 44, 66); | ^^ expected !, found integer @@ -80,7 +80,7 @@ LL | let x: (usize, !, usize) = (return, 44, 66); found type `{integer}` error[E0308]: mismatched types - --> $DIR/coerce-to-bang.rs:76:37 + --> $DIR/coerce-to-bang.rs:74:37 | LL | let x: (usize, !, usize) = (22, 44, return); | ^^ expected !, found integer diff --git a/src/test/ui/consts/validate_never_arrays.rs b/src/test/ui/consts/validate_never_arrays.rs index 9610b7b22f1..1270dc4ee30 100644 --- a/src/test/ui/consts/validate_never_arrays.rs +++ b/src/test/ui/consts/validate_never_arrays.rs @@ -1,4 +1,4 @@ -#![feature(const_raw_ptr_deref, never_type)] +#![feature(const_raw_ptr_deref)] const FOO: &[!; 1] = unsafe { &*(1_usize as *const [!; 1]) }; //~ ERROR undefined behavior diff --git a/src/test/ui/empty/empty-never-array.rs b/src/test/ui/empty/empty-never-array.rs index f0ecea42f39..38702f8d28f 100644 --- a/src/test/ui/empty/empty-never-array.rs +++ b/src/test/ui/empty/empty-never-array.rs @@ -1,5 +1,3 @@ -#![feature(never_type)] - enum Helper<T, U> { T(T, [!; 0]), #[allow(dead_code)] diff --git a/src/test/ui/empty/empty-never-array.stderr b/src/test/ui/empty/empty-never-array.stderr index d865b59f0b9..defcd256f7d 100644 --- a/src/test/ui/empty/empty-never-array.stderr +++ b/src/test/ui/empty/empty-never-array.stderr @@ -1,5 +1,5 @@ error[E0005]: refutable pattern in local binding: `T(_, _)` not covered - --> $DIR/empty-never-array.rs:10:9 + --> $DIR/empty-never-array.rs:8:9 | LL | / enum Helper<T, U> { LL | | T(T, [!; 0]), @@ -20,7 +20,7 @@ LL | if let Helper::U(u) = Helper::T(t, []) { /* */ } | error[E0381]: use of possibly-uninitialized variable: `u` - --> $DIR/empty-never-array.rs:12:5 + --> $DIR/empty-never-array.rs:10:5 | LL | u | ^ use of possibly-uninitialized `u` diff --git a/src/test/ui/feature-gates/feature-gate-exhaustive-patterns.rs b/src/test/ui/feature-gates/feature-gate-exhaustive-patterns.rs index f0cc9ea7055..c27089d2a05 100644 --- a/src/test/ui/feature-gates/feature-gate-exhaustive-patterns.rs +++ b/src/test/ui/feature-gates/feature-gate-exhaustive-patterns.rs @@ -1,5 +1,3 @@ -#![feature(never_type)] - fn foo() -> Result<u32, !> { Ok(123) } diff --git a/src/test/ui/feature-gates/feature-gate-exhaustive-patterns.stderr b/src/test/ui/feature-gates/feature-gate-exhaustive-patterns.stderr index 08c36cece4c..e599a9ee150 100644 --- a/src/test/ui/feature-gates/feature-gate-exhaustive-patterns.stderr +++ b/src/test/ui/feature-gates/feature-gate-exhaustive-patterns.stderr @@ -1,5 +1,5 @@ error[E0005]: refutable pattern in local binding: `Err(_)` not covered - --> $DIR/feature-gate-exhaustive-patterns.rs:8:9 + --> $DIR/feature-gate-exhaustive-patterns.rs:6:9 | LL | let Ok(_x) = foo(); | ^^^^^^ pattern `Err(_)` not covered diff --git a/src/test/ui/feature-gates/feature-gate-never_type.rs b/src/test/ui/feature-gates/feature-gate-never_type.rs deleted file mode 100644 index be8c27dbb1b..00000000000 --- a/src/test/ui/feature-gates/feature-gate-never_type.rs +++ /dev/null @@ -1,17 +0,0 @@ -// Test that ! errors when used in illegal positions with feature(never_type) disabled - -trait Foo { - type Wub; -} - -type Ma = (u32, !, i32); //~ ERROR type is experimental -type Meeshka = Vec<!>; //~ ERROR type is experimental -type Mow = &'static fn(!) -> !; //~ ERROR type is experimental -type Skwoz = &'static mut !; //~ ERROR type is experimental - -impl Foo for Meeshka { - type Wub = !; //~ ERROR type is experimental -} - -fn main() { -} diff --git a/src/test/ui/feature-gates/feature-gate-never_type.stderr b/src/test/ui/feature-gates/feature-gate-never_type.stderr deleted file mode 100644 index d86ab99b82b..00000000000 --- a/src/test/ui/feature-gates/feature-gate-never_type.stderr +++ /dev/null @@ -1,48 +0,0 @@ -error[E0658]: The `!` type is experimental - --> $DIR/feature-gate-never_type.rs:7:17 - | -LL | type Ma = (u32, !, i32); - | ^ - | - = note: for more information, see https://github.com/rust-lang/rust/issues/35121 - = help: add `#![feature(never_type)]` to the crate attributes to enable - -error[E0658]: The `!` type is experimental - --> $DIR/feature-gate-never_type.rs:8:20 - | -LL | type Meeshka = Vec<!>; - | ^ - | - = note: for more information, see https://github.com/rust-lang/rust/issues/35121 - = help: add `#![feature(never_type)]` to the crate attributes to enable - -error[E0658]: The `!` type is experimental - --> $DIR/feature-gate-never_type.rs:9:24 - | -LL | type Mow = &'static fn(!) -> !; - | ^ - | - = note: for more information, see https://github.com/rust-lang/rust/issues/35121 - = help: add `#![feature(never_type)]` to the crate attributes to enable - -error[E0658]: The `!` type is experimental - --> $DIR/feature-gate-never_type.rs:10:27 - | -LL | type Skwoz = &'static mut !; - | ^ - | - = note: for more information, see https://github.com/rust-lang/rust/issues/35121 - = help: add `#![feature(never_type)]` to the crate attributes to enable - -error[E0658]: The `!` type is experimental - --> $DIR/feature-gate-never_type.rs:13:16 - | -LL | type Wub = !; - | ^ - | - = note: for more information, see https://github.com/rust-lang/rust/issues/35121 - = help: add `#![feature(never_type)]` to the crate attributes to enable - -error: aborting due to 5 previous errors - -For more information about this error, try `rustc --explain E0658`. diff --git a/src/test/ui/for-loop-while/loop-break-value.rs b/src/test/ui/for-loop-while/loop-break-value.rs index d7209fc4de8..29848bb0ced 100644 --- a/src/test/ui/for-loop-while/loop-break-value.rs +++ b/src/test/ui/for-loop-while/loop-break-value.rs @@ -1,7 +1,6 @@ // run-pass #![allow(unreachable_code)] -#![feature(never_type)] #[allow(unused)] fn never_returns() { diff --git a/src/test/ui/lint/must_use-unit.rs b/src/test/ui/lint/must_use-unit.rs index 4dd4798abb7..8f59bab26d3 100644 --- a/src/test/ui/lint/must_use-unit.rs +++ b/src/test/ui/lint/must_use-unit.rs @@ -1,4 +1,3 @@ -#![feature(never_type)] #![deny(unused_must_use)] #[must_use] diff --git a/src/test/ui/lint/must_use-unit.stderr b/src/test/ui/lint/must_use-unit.stderr index 0a9939b2015..a6d0259a081 100644 --- a/src/test/ui/lint/must_use-unit.stderr +++ b/src/test/ui/lint/must_use-unit.stderr @@ -1,17 +1,17 @@ error: unused return value of `foo` that must be used - --> $DIR/must_use-unit.rs:13:5 + --> $DIR/must_use-unit.rs:12:5 | LL | foo(); | ^^^^^^ | note: lint level defined here - --> $DIR/must_use-unit.rs:2:9 + --> $DIR/must_use-unit.rs:1:9 | LL | #![deny(unused_must_use)] | ^^^^^^^^^^^^^^^ error: unused return value of `bar` that must be used - --> $DIR/must_use-unit.rs:15:5 + --> $DIR/must_use-unit.rs:14:5 | LL | bar(); | ^^^^^^ diff --git a/src/test/ui/lint/uninitialized-zeroed.rs b/src/test/ui/lint/uninitialized-zeroed.rs index 473be434a75..ed2369fd650 100644 --- a/src/test/ui/lint/uninitialized-zeroed.rs +++ b/src/test/ui/lint/uninitialized-zeroed.rs @@ -2,7 +2,7 @@ // This test checks that calling `mem::{uninitialized,zeroed}` with certain types results // in a lint. -#![feature(never_type, rustc_attrs)] +#![feature(rustc_attrs)] #![allow(deprecated)] #![deny(invalid_value)] diff --git a/src/test/ui/loops/loop-break-value.rs b/src/test/ui/loops/loop-break-value.rs index 7c2f63ec51a..8d88aefdb51 100644 --- a/src/test/ui/loops/loop-break-value.rs +++ b/src/test/ui/loops/loop-break-value.rs @@ -1,5 +1,3 @@ -#![feature(never_type)] - fn main() { let val: ! = loop { break break; }; //~^ ERROR mismatched types diff --git a/src/test/ui/loops/loop-break-value.stderr b/src/test/ui/loops/loop-break-value.stderr index b2e3ebc53ad..8c4bcd3a9b7 100644 --- a/src/test/ui/loops/loop-break-value.stderr +++ b/src/test/ui/loops/loop-break-value.stderr @@ -1,5 +1,5 @@ warning: denote infinite loops with `loop { ... }` - --> $DIR/loop-break-value.rs:26:5 + --> $DIR/loop-break-value.rs:24:5 | LL | 'while_loop: while true { | ^^^^^^^^^^^^^^^^^^^^^^^ help: use `loop` @@ -7,7 +7,7 @@ LL | 'while_loop: while true { = note: `#[warn(while_true)]` on by default error[E0571]: `break` with value from a `while` loop - --> $DIR/loop-break-value.rs:28:9 + --> $DIR/loop-break-value.rs:26:9 | LL | break (); | ^^^^^^^^ can only break with a value inside `loop` or breakable block @@ -18,7 +18,7 @@ LL | break; | ^^^^^ error[E0571]: `break` with value from a `while` loop - --> $DIR/loop-break-value.rs:30:13 + --> $DIR/loop-break-value.rs:28:13 | LL | break 'while_loop 123; | ^^^^^^^^^^^^^^^^^^^^^ can only break with a value inside `loop` or breakable block @@ -29,7 +29,7 @@ LL | break; | ^^^^^ error[E0571]: `break` with value from a `while let` loop - --> $DIR/loop-break-value.rs:38:12 + --> $DIR/loop-break-value.rs:36:12 | LL | if break () { | ^^^^^^^^ can only break with a value inside `loop` or breakable block @@ -40,7 +40,7 @@ LL | if break { | ^^^^^ error[E0571]: `break` with value from a `while let` loop - --> $DIR/loop-break-value.rs:43:9 + --> $DIR/loop-break-value.rs:41:9 | LL | break None; | ^^^^^^^^^^ can only break with a value inside `loop` or breakable block @@ -51,7 +51,7 @@ LL | break; | ^^^^^ error[E0571]: `break` with value from a `while let` loop - --> $DIR/loop-break-value.rs:49:13 + --> $DIR/loop-break-value.rs:47:13 | LL | break 'while_let_loop "nope"; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can only break with a value inside `loop` or breakable block @@ -62,7 +62,7 @@ LL | break; | ^^^^^ error[E0571]: `break` with value from a `for` loop - --> $DIR/loop-break-value.rs:56:9 + --> $DIR/loop-break-value.rs:54:9 | LL | break (); | ^^^^^^^^ can only break with a value inside `loop` or breakable block @@ -73,7 +73,7 @@ LL | break; | ^^^^^ error[E0571]: `break` with value from a `for` loop - --> $DIR/loop-break-value.rs:57:9 + --> $DIR/loop-break-value.rs:55:9 | LL | break [()]; | ^^^^^^^^^^ can only break with a value inside `loop` or breakable block @@ -84,7 +84,7 @@ LL | break; | ^^^^^ error[E0571]: `break` with value from a `for` loop - --> $DIR/loop-break-value.rs:64:13 + --> $DIR/loop-break-value.rs:62:13 | LL | break 'for_loop Some(17); | ^^^^^^^^^^^^^^^^^^^^^^^^ can only break with a value inside `loop` or breakable block @@ -95,7 +95,7 @@ LL | break; | ^^^^^ error[E0308]: mismatched types - --> $DIR/loop-break-value.rs:4:31 + --> $DIR/loop-break-value.rs:2:31 | LL | let val: ! = loop { break break; }; | ^^^^^ expected !, found () @@ -104,7 +104,7 @@ LL | let val: ! = loop { break break; }; found type `()` error[E0308]: mismatched types - --> $DIR/loop-break-value.rs:11:19 + --> $DIR/loop-break-value.rs:9:19 | LL | break 123; | ^^^ expected &str, found integer @@ -113,7 +113,7 @@ LL | break 123; found type `{integer}` error[E0308]: mismatched types - --> $DIR/loop-break-value.rs:16:15 + --> $DIR/loop-break-value.rs:14:15 | LL | break "asdf"; | ^^^^^^ expected i32, found reference @@ -122,7 +122,7 @@ LL | break "asdf"; found type `&'static str` error[E0308]: mismatched types - --> $DIR/loop-break-value.rs:21:31 + --> $DIR/loop-break-value.rs:19:31 | LL | break 'outer_loop "nope"; | ^^^^^^ expected i32, found reference @@ -131,7 +131,7 @@ LL | break 'outer_loop "nope"; found type `&'static str` error[E0308]: mismatched types - --> $DIR/loop-break-value.rs:73:26 + --> $DIR/loop-break-value.rs:71:26 | LL | break 'c 123; | ^^^ expected (), found integer @@ -140,7 +140,7 @@ LL | break 'c 123; found type `{integer}` error[E0308]: mismatched types - --> $DIR/loop-break-value.rs:80:15 + --> $DIR/loop-break-value.rs:78:15 | LL | break (break, break); | ^^^^^^^^^^^^^^ expected (), found tuple @@ -149,7 +149,7 @@ LL | break (break, break); found type `(!, !)` error[E0308]: mismatched types - --> $DIR/loop-break-value.rs:85:15 + --> $DIR/loop-break-value.rs:83:15 | LL | break 2; | ^ expected (), found integer @@ -158,7 +158,7 @@ LL | break 2; found type `{integer}` error[E0308]: mismatched types - --> $DIR/loop-break-value.rs:90:9 + --> $DIR/loop-break-value.rs:88:9 | LL | break; | ^^^^^ diff --git a/src/test/ui/mir/mir_calls_to_shims.rs b/src/test/ui/mir/mir_calls_to_shims.rs index 6f13d5612ce..df7c45ad1d1 100644 --- a/src/test/ui/mir/mir_calls_to_shims.rs +++ b/src/test/ui/mir/mir_calls_to_shims.rs @@ -2,7 +2,6 @@ // ignore-wasm32-bare compiled with panic=abort by default #![feature(fn_traits)] -#![feature(never_type)] use std::panic; diff --git a/src/test/ui/never_type/adjust_never.rs b/src/test/ui/never_type/adjust_never.rs index 0d7d2c0ed3f..e4d15c8a17d 100644 --- a/src/test/ui/never_type/adjust_never.rs +++ b/src/test/ui/never_type/adjust_never.rs @@ -2,8 +2,6 @@ // check-pass -#![feature(never_type)] - fn main() { let x: ! = panic!(); let y: u32 = x; diff --git a/src/test/ui/never_type/call-fn-never-arg-wrong-type.rs b/src/test/ui/never_type/call-fn-never-arg-wrong-type.rs index d06637e74a2..a2b44e91f11 100644 --- a/src/test/ui/never_type/call-fn-never-arg-wrong-type.rs +++ b/src/test/ui/never_type/call-fn-never-arg-wrong-type.rs @@ -1,7 +1,5 @@ // Test that we can't pass other types for ! -#![feature(never_type)] - fn foo(x: !) -> ! { x } diff --git a/src/test/ui/never_type/call-fn-never-arg-wrong-type.stderr b/src/test/ui/never_type/call-fn-never-arg-wrong-type.stderr index 7a50fd367d2..e5cbdcbe73b 100644 --- a/src/test/ui/never_type/call-fn-never-arg-wrong-type.stderr +++ b/src/test/ui/never_type/call-fn-never-arg-wrong-type.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/call-fn-never-arg-wrong-type.rs:10:9 + --> $DIR/call-fn-never-arg-wrong-type.rs:8:9 | LL | foo("wow"); | ^^^^^ expected !, found reference diff --git a/src/test/ui/never_type/call-fn-never-arg.rs b/src/test/ui/never_type/call-fn-never-arg.rs index 9d355817ee8..55a7b79157a 100644 --- a/src/test/ui/never_type/call-fn-never-arg.rs +++ b/src/test/ui/never_type/call-fn-never-arg.rs @@ -2,7 +2,6 @@ // check-pass -#![feature(never_type)] #![allow(unreachable_code)] fn foo(x: !) -> ! { diff --git a/src/test/ui/never_type/cast-never.rs b/src/test/ui/never_type/cast-never.rs index 0139ebe4640..fbba114ab32 100644 --- a/src/test/ui/never_type/cast-never.rs +++ b/src/test/ui/never_type/cast-never.rs @@ -2,8 +2,6 @@ // check-pass -#![feature(never_type)] - fn main() { let x: ! = panic!(); let y: u32 = x as u32; diff --git a/src/test/ui/never_type/defaulted-never-note.rs b/src/test/ui/never_type/defaulted-never-note.rs index d3fb8a09414..714ef6adaf5 100644 --- a/src/test/ui/never_type/defaulted-never-note.rs +++ b/src/test/ui/never_type/defaulted-never-note.rs @@ -1,7 +1,3 @@ -// We need to opt into the `!` feature in order to trigger the -// requirement that this is testing. -#![feature(never_type)] - #![allow(unused)] trait Deserialize: Sized { diff --git a/src/test/ui/never_type/defaulted-never-note.stderr b/src/test/ui/never_type/defaulted-never-note.stderr index 28c9da059ed..eb780b6328c 100644 --- a/src/test/ui/never_type/defaulted-never-note.stderr +++ b/src/test/ui/never_type/defaulted-never-note.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `!: ImplementedForUnitButNotNever` is not satisfied - --> $DIR/defaulted-never-note.rs:27:5 + --> $DIR/defaulted-never-note.rs:23:5 | LL | fn foo<T: ImplementedForUnitButNotNever>(_t: T) {} | --- ----------------------------- required by this bound in `foo` diff --git a/src/test/ui/never_type/dispatch_from_dyn_zst.rs b/src/test/ui/never_type/dispatch_from_dyn_zst.rs index 764f58ce9e8..342d5e47915 100644 --- a/src/test/ui/never_type/dispatch_from_dyn_zst.rs +++ b/src/test/ui/never_type/dispatch_from_dyn_zst.rs @@ -1,6 +1,6 @@ // run-pass -#![feature(unsize, dispatch_from_dyn, never_type)] +#![feature(unsize, dispatch_from_dyn)] #![allow(dead_code)] diff --git a/src/test/ui/never_type/diverging-fallback-control-flow.rs b/src/test/ui/never_type/diverging-fallback-control-flow.rs index c68e6364ed4..2ea9c18ee90 100644 --- a/src/test/ui/never_type/diverging-fallback-control-flow.rs +++ b/src/test/ui/never_type/diverging-fallback-control-flow.rs @@ -11,8 +11,6 @@ // These represent current behavior, but are pretty dubious. I would // like to revisit these and potentially change them. --nmatsakis -#![feature(never_type)] - trait BadDefault { fn default() -> Self; } diff --git a/src/test/ui/never_type/impl-for-never.rs b/src/test/ui/never_type/impl-for-never.rs index 9423f08858b..cbfda9a2cc0 100644 --- a/src/test/ui/never_type/impl-for-never.rs +++ b/src/test/ui/never_type/impl-for-never.rs @@ -1,7 +1,5 @@ // run-pass -#![feature(never_type)] - // Test that we can call static methods on ! both directly and when it appears in a generic trait StringifyType { diff --git a/src/test/ui/never_type/issue-13352.stderr b/src/test/ui/never_type/issue-13352.stderr index 58ac74be3e3..da914a2b49c 100644 --- a/src/test/ui/never_type/issue-13352.stderr +++ b/src/test/ui/never_type/issue-13352.stderr @@ -1,10 +1,10 @@ -error[E0277]: cannot add `()` to `usize` +error[E0277]: cannot add `!` to `usize` --> $DIR/issue-13352.rs:9:13 | LL | 2_usize + (loop {}); - | ^ no implementation for `usize + ()` + | ^ no implementation for `usize + !` | - = help: the trait `std::ops::Add<()>` is not implemented for `usize` + = help: the trait `std::ops::Add<!>` is not implemented for `usize` error: aborting due to previous error diff --git a/src/test/ui/never_type/issue-2149.stderr b/src/test/ui/never_type/issue-2149.stderr index 8ce2ba03332..67fe3966d62 100644 --- a/src/test/ui/never_type/issue-2149.stderr +++ b/src/test/ui/never_type/issue-2149.stderr @@ -1,10 +1,10 @@ -error[E0277]: cannot add `std::vec::Vec<B>` to `()` +error[E0277]: cannot add `std::vec::Vec<B>` to `!` --> $DIR/issue-2149.rs:8:33 | LL | for elt in self { r = r + f(*elt); } - | ^ no implementation for `() + std::vec::Vec<B>` + | ^ no implementation for `! + std::vec::Vec<B>` | - = help: the trait `std::ops::Add<std::vec::Vec<B>>` is not implemented for `()` + = help: the trait `std::ops::Add<std::vec::Vec<B>>` is not implemented for `!` error[E0599]: no method named `bind` found for type `[&str; 1]` in the current scope --> $DIR/issue-2149.rs:13:12 diff --git a/src/test/ui/never_type/issue-44402.rs b/src/test/ui/never_type/issue-44402.rs index 699e480dfe7..0e6588bbe78 100644 --- a/src/test/ui/never_type/issue-44402.rs +++ b/src/test/ui/never_type/issue-44402.rs @@ -1,7 +1,6 @@ // check-pass #![allow(dead_code)] -#![feature(never_type)] #![feature(exhaustive_patterns)] // Regression test for inhabitedness check. The old diff --git a/src/test/ui/never_type/never-assign-dead-code.rs b/src/test/ui/never_type/never-assign-dead-code.rs index 7bb7c87097c..5c1300c7151 100644 --- a/src/test/ui/never_type/never-assign-dead-code.rs +++ b/src/test/ui/never_type/never-assign-dead-code.rs @@ -2,7 +2,6 @@ // check-pass -#![feature(never_type)] #![warn(unused)] fn main() { diff --git a/src/test/ui/never_type/never-assign-dead-code.stderr b/src/test/ui/never_type/never-assign-dead-code.stderr index 1860150fa8b..1dc15251d1a 100644 --- a/src/test/ui/never_type/never-assign-dead-code.stderr +++ b/src/test/ui/never_type/never-assign-dead-code.stderr @@ -1,5 +1,5 @@ warning: unreachable statement - --> $DIR/never-assign-dead-code.rs:10:5 + --> $DIR/never-assign-dead-code.rs:9:5 | LL | let x: ! = panic!("aah"); | ------------- any code following this expression is unreachable @@ -7,7 +7,7 @@ LL | drop(x); | ^^^^^^^^ unreachable statement | note: lint level defined here - --> $DIR/never-assign-dead-code.rs:6:9 + --> $DIR/never-assign-dead-code.rs:5:9 | LL | #![warn(unused)] | ^^^^^^ @@ -15,7 +15,7 @@ LL | #![warn(unused)] = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) warning: unreachable call - --> $DIR/never-assign-dead-code.rs:10:5 + --> $DIR/never-assign-dead-code.rs:9:5 | LL | drop(x); | ^^^^ - any code following this expression is unreachable @@ -23,13 +23,13 @@ LL | drop(x); | unreachable call warning: unused variable: `x` - --> $DIR/never-assign-dead-code.rs:9:9 + --> $DIR/never-assign-dead-code.rs:8:9 | LL | let x: ! = panic!("aah"); | ^ help: consider prefixing with an underscore: `_x` | note: lint level defined here - --> $DIR/never-assign-dead-code.rs:6:9 + --> $DIR/never-assign-dead-code.rs:5:9 | LL | #![warn(unused)] | ^^^^^^ diff --git a/src/test/ui/never_type/never-assign-wrong-type.rs b/src/test/ui/never_type/never-assign-wrong-type.rs index 67e26f5663f..9ca1ac7462d 100644 --- a/src/test/ui/never_type/never-assign-wrong-type.rs +++ b/src/test/ui/never_type/never-assign-wrong-type.rs @@ -1,6 +1,5 @@ // Test that we can't use another type in place of ! -#![feature(never_type)] #![deny(warnings)] fn main() { diff --git a/src/test/ui/never_type/never-assign-wrong-type.stderr b/src/test/ui/never_type/never-assign-wrong-type.stderr index da2e77d023d..32c9fab6590 100644 --- a/src/test/ui/never_type/never-assign-wrong-type.stderr +++ b/src/test/ui/never_type/never-assign-wrong-type.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/never-assign-wrong-type.rs:7:16 + --> $DIR/never-assign-wrong-type.rs:6:16 | LL | let x: ! = "hello"; | ^^^^^^^ expected !, found reference diff --git a/src/test/ui/never_type/never-associated-type.rs b/src/test/ui/never_type/never-associated-type.rs index 3bb917c9316..45e54b9bf7c 100644 --- a/src/test/ui/never_type/never-associated-type.rs +++ b/src/test/ui/never_type/never-associated-type.rs @@ -2,8 +2,6 @@ // check-pass -#![feature(never_type)] - trait Foo { type Wow; diff --git a/src/test/ui/never_type/never-from-impl-is-reserved.rs b/src/test/ui/never_type/never-from-impl-is-reserved.rs index 9d16015bdc1..df74b6a53f8 100644 --- a/src/test/ui/never_type/never-from-impl-is-reserved.rs +++ b/src/test/ui/never_type/never-from-impl-is-reserved.rs @@ -1,7 +1,5 @@ // check that the `for<T> T: From<!>` impl is reserved -#![feature(never_type)] - pub struct MyFoo; pub trait MyTrait {} diff --git a/src/test/ui/never_type/never-from-impl-is-reserved.stderr b/src/test/ui/never_type/never-from-impl-is-reserved.stderr index 8b8d0f4ea73..8b3155988ea 100644 --- a/src/test/ui/never_type/never-from-impl-is-reserved.stderr +++ b/src/test/ui/never_type/never-from-impl-is-reserved.stderr @@ -1,5 +1,5 @@ error[E0119]: conflicting implementations of trait `MyTrait` for type `MyFoo`: - --> $DIR/never-from-impl-is-reserved.rs:10:1 + --> $DIR/never-from-impl-is-reserved.rs:8:1 | LL | impl MyTrait for MyFoo {} | ---------------------- first implementation here diff --git a/src/test/ui/never_type/never-result.rs b/src/test/ui/never_type/never-result.rs index 35af37910ef..800553fce87 100644 --- a/src/test/ui/never_type/never-result.rs +++ b/src/test/ui/never_type/never-result.rs @@ -5,8 +5,6 @@ // Test that we can extract a ! through pattern matching then use it as several different types. -#![feature(never_type)] - fn main() { let x: Result<u32, !> = Ok(123); match x { diff --git a/src/test/ui/never_type/never-type-arg.rs b/src/test/ui/never_type/never-type-arg.rs index 13cd59e6aa9..3cbb114f43b 100644 --- a/src/test/ui/never_type/never-type-arg.rs +++ b/src/test/ui/never_type/never-type-arg.rs @@ -2,8 +2,6 @@ // check-pass -#![feature(never_type)] - struct Wub; impl PartialEq<!> for Wub { diff --git a/src/test/ui/never_type/never-type-rvalues.rs b/src/test/ui/never_type/never-type-rvalues.rs index 9ccc73dbf92..9bfc5572b9e 100644 --- a/src/test/ui/never_type/never-type-rvalues.rs +++ b/src/test/ui/never_type/never-type-rvalues.rs @@ -1,6 +1,5 @@ // run-pass -#![feature(never_type)] #![allow(dead_code)] #![allow(path_statements)] #![allow(unreachable_patterns)] diff --git a/src/test/ui/never_type/never_transmute_never.rs b/src/test/ui/never_type/never_transmute_never.rs index fce3ced9aac..cdf04de19e5 100644 --- a/src/test/ui/never_type/never_transmute_never.rs +++ b/src/test/ui/never_type/never_transmute_never.rs @@ -2,7 +2,6 @@ #![crate_type="lib"] -#![feature(never_type)] #![allow(dead_code)] #![allow(unreachable_code)] #![allow(unused_variables)] diff --git a/src/test/ui/never_type/panic-uninitialized-zeroed.rs b/src/test/ui/never_type/panic-uninitialized-zeroed.rs index e0c30160b9e..e5e0e188de6 100644 --- a/src/test/ui/never_type/panic-uninitialized-zeroed.rs +++ b/src/test/ui/never_type/panic-uninitialized-zeroed.rs @@ -3,7 +3,6 @@ // This test checks that instantiating an uninhabited type via `mem::{uninitialized,zeroed}` results // in a runtime panic. -#![feature(never_type)] #![allow(deprecated, invalid_value)] use std::{mem, panic}; diff --git a/src/test/ui/never_type/try_from.rs b/src/test/ui/never_type/try_from.rs index 50451576f9c..977ea3656b3 100644 --- a/src/test/ui/never_type/try_from.rs +++ b/src/test/ui/never_type/try_from.rs @@ -5,8 +5,6 @@ // This test was added to show the motivation for doing this // over `TryFrom` being blanket impl for all `T: From` -#![feature(never_type)] - use std::convert::{TryInto, Infallible}; struct Foo<T> { diff --git a/src/test/ui/pattern/usefulness/match-privately-empty.rs b/src/test/ui/pattern/usefulness/match-privately-empty.rs index 315eb03d165..ea608651387 100644 --- a/src/test/ui/pattern/usefulness/match-privately-empty.rs +++ b/src/test/ui/pattern/usefulness/match-privately-empty.rs @@ -1,4 +1,3 @@ -#![feature(never_type)] #![feature(exhaustive_patterns)] mod private { diff --git a/src/test/ui/pattern/usefulness/match-privately-empty.stderr b/src/test/ui/pattern/usefulness/match-privately-empty.stderr index f79d180a1b8..66d0d958774 100644 --- a/src/test/ui/pattern/usefulness/match-privately-empty.stderr +++ b/src/test/ui/pattern/usefulness/match-privately-empty.stderr @@ -1,5 +1,5 @@ error[E0004]: non-exhaustive patterns: `Some(Private { misc: true, .. })` not covered - --> $DIR/match-privately-empty.rs:13:11 + --> $DIR/match-privately-empty.rs:12:11 | LL | match private::DATA { | ^^^^^^^^^^^^^ pattern `Some(Private { misc: true, .. })` not covered diff --git a/src/test/ui/print_type_sizes/uninhabited.rs b/src/test/ui/print_type_sizes/uninhabited.rs index ae4e492456a..3a2ca19d8e0 100644 --- a/src/test/ui/print_type_sizes/uninhabited.rs +++ b/src/test/ui/print_type_sizes/uninhabited.rs @@ -4,7 +4,6 @@ // ^-- needed because `--pass check` does not emit the output needed. // FIXME: consider using an attribute instead of side-effects. -#![feature(never_type)] #![feature(start)] #[start] diff --git a/src/test/ui/reachable/expr_add.rs b/src/test/ui/reachable/expr_add.rs index b45e5daf42c..640c2a2cf8f 100644 --- a/src/test/ui/reachable/expr_add.rs +++ b/src/test/ui/reachable/expr_add.rs @@ -1,4 +1,3 @@ -#![feature(never_type)] #![allow(unused_variables)] #![deny(unreachable_code)] diff --git a/src/test/ui/reachable/expr_add.stderr b/src/test/ui/reachable/expr_add.stderr index 880dea1cc35..11c41fdc394 100644 --- a/src/test/ui/reachable/expr_add.stderr +++ b/src/test/ui/reachable/expr_add.stderr @@ -1,5 +1,5 @@ error: unreachable expression - --> $DIR/expr_add.rs:17:13 + --> $DIR/expr_add.rs:16:13 | LL | let x = Foo + return; | ^^^^^^------ @@ -8,7 +8,7 @@ LL | let x = Foo + return; | unreachable expression | note: lint level defined here - --> $DIR/expr_add.rs:3:9 + --> $DIR/expr_add.rs:2:9 | LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/reachable/expr_assign.rs b/src/test/ui/reachable/expr_assign.rs index e547f75e269..3914fb32432 100644 --- a/src/test/ui/reachable/expr_assign.rs +++ b/src/test/ui/reachable/expr_assign.rs @@ -1,4 +1,3 @@ -#![feature(never_type)] #![allow(unused_variables)] #![allow(unused_assignments)] #![allow(dead_code)] diff --git a/src/test/ui/reachable/expr_assign.stderr b/src/test/ui/reachable/expr_assign.stderr index 3004da04063..90aec15e3be 100644 --- a/src/test/ui/reachable/expr_assign.stderr +++ b/src/test/ui/reachable/expr_assign.stderr @@ -1,5 +1,5 @@ error: unreachable expression - --> $DIR/expr_assign.rs:10:5 + --> $DIR/expr_assign.rs:9:5 | LL | x = return; | ^^^^------ @@ -8,13 +8,13 @@ LL | x = return; | unreachable expression | note: lint level defined here - --> $DIR/expr_assign.rs:5:9 + --> $DIR/expr_assign.rs:4:9 | LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ error: unreachable expression - --> $DIR/expr_assign.rs:20:14 + --> $DIR/expr_assign.rs:19:14 | LL | *p = return; | -- ^^^^^^ unreachable expression @@ -22,7 +22,7 @@ LL | *p = return; | any code following this expression is unreachable error: unreachable expression - --> $DIR/expr_assign.rs:26:15 + --> $DIR/expr_assign.rs:25:15 | LL | *{return; &mut i} = 22; | ------ ^^^^^^ unreachable expression diff --git a/src/test/ui/reachable/expr_call.rs b/src/test/ui/reachable/expr_call.rs index 1eaa96c3ce7..ce1a94e3c4a 100644 --- a/src/test/ui/reachable/expr_call.rs +++ b/src/test/ui/reachable/expr_call.rs @@ -1,4 +1,3 @@ -#![feature(never_type)] #![allow(unused_variables)] #![allow(unused_assignments)] #![allow(dead_code)] diff --git a/src/test/ui/reachable/expr_call.stderr b/src/test/ui/reachable/expr_call.stderr index ae8b4dd87b5..613fc31b861 100644 --- a/src/test/ui/reachable/expr_call.stderr +++ b/src/test/ui/reachable/expr_call.stderr @@ -1,5 +1,5 @@ error: unreachable expression - --> $DIR/expr_call.rs:13:17 + --> $DIR/expr_call.rs:12:17 | LL | foo(return, 22); | ------ ^^ unreachable expression @@ -7,13 +7,13 @@ LL | foo(return, 22); | any code following this expression is unreachable | note: lint level defined here - --> $DIR/expr_call.rs:5:9 + --> $DIR/expr_call.rs:4:9 | LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ error: unreachable call - --> $DIR/expr_call.rs:18:5 + --> $DIR/expr_call.rs:17:5 | LL | bar(return); | ^^^ ------ any code following this expression is unreachable diff --git a/src/test/ui/reachable/expr_cast.rs b/src/test/ui/reachable/expr_cast.rs index f53bcb97e69..76a7306b9d9 100644 --- a/src/test/ui/reachable/expr_cast.rs +++ b/src/test/ui/reachable/expr_cast.rs @@ -2,7 +2,7 @@ #![allow(unused_assignments)] #![allow(dead_code)] #![deny(unreachable_code)] -#![feature(never_type, type_ascription)] +#![feature(type_ascription)] fn a() { // the cast is unreachable: diff --git a/src/test/ui/reachable/expr_method.rs b/src/test/ui/reachable/expr_method.rs index d917df05b3c..e74a7daec88 100644 --- a/src/test/ui/reachable/expr_method.rs +++ b/src/test/ui/reachable/expr_method.rs @@ -1,4 +1,3 @@ -#![feature(never_type)] #![allow(unused_variables)] #![allow(unused_assignments)] #![allow(dead_code)] diff --git a/src/test/ui/reachable/expr_method.stderr b/src/test/ui/reachable/expr_method.stderr index 82a0745f062..7475cf7a365 100644 --- a/src/test/ui/reachable/expr_method.stderr +++ b/src/test/ui/reachable/expr_method.stderr @@ -1,5 +1,5 @@ error: unreachable expression - --> $DIR/expr_method.rs:16:21 + --> $DIR/expr_method.rs:15:21 | LL | Foo.foo(return, 22); | ------ ^^ unreachable expression @@ -7,13 +7,13 @@ LL | Foo.foo(return, 22); | any code following this expression is unreachable | note: lint level defined here - --> $DIR/expr_method.rs:5:9 + --> $DIR/expr_method.rs:4:9 | LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ error: unreachable call - --> $DIR/expr_method.rs:21:9 + --> $DIR/expr_method.rs:20:9 | LL | Foo.bar(return); | ^^^ ------ any code following this expression is unreachable diff --git a/src/test/ui/reachable/expr_type.rs b/src/test/ui/reachable/expr_type.rs index 8d32397b542..ff647bda0e8 100644 --- a/src/test/ui/reachable/expr_type.rs +++ b/src/test/ui/reachable/expr_type.rs @@ -2,7 +2,7 @@ #![allow(unused_assignments)] #![allow(dead_code)] #![deny(unreachable_code)] -#![feature(never_type, type_ascription)] +#![feature(type_ascription)] fn a() { // the cast is unreachable: diff --git a/src/test/ui/reachable/expr_unary.rs b/src/test/ui/reachable/expr_unary.rs index e229d22ebc7..6f221c360cb 100644 --- a/src/test/ui/reachable/expr_unary.rs +++ b/src/test/ui/reachable/expr_unary.rs @@ -1,4 +1,3 @@ -#![feature(never_type)] #![allow(unused_variables)] #![allow(unused_assignments)] #![allow(dead_code)] diff --git a/src/test/ui/reachable/expr_unary.stderr b/src/test/ui/reachable/expr_unary.stderr index f5c3564217b..a576f920923 100644 --- a/src/test/ui/reachable/expr_unary.stderr +++ b/src/test/ui/reachable/expr_unary.stderr @@ -1,11 +1,11 @@ error[E0600]: cannot apply unary operator `!` to type `!` - --> $DIR/expr_unary.rs:8:16 + --> $DIR/expr_unary.rs:7:16 | LL | let x: ! = ! { return; }; | ^^^^^^^^^^^^^ cannot apply unary operator `!` error: unreachable expression - --> $DIR/expr_unary.rs:8:16 + --> $DIR/expr_unary.rs:7:16 | LL | let x: ! = ! { return; }; | ^^^^------^^^ @@ -14,7 +14,7 @@ LL | let x: ! = ! { return; }; | unreachable expression | note: lint level defined here - --> $DIR/expr_unary.rs:5:9 + --> $DIR/expr_unary.rs:4:9 | LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/reachable/unreachable-loop-patterns.rs b/src/test/ui/reachable/unreachable-loop-patterns.rs index 6f1d2efa1b2..6d882737003 100644 --- a/src/test/ui/reachable/unreachable-loop-patterns.rs +++ b/src/test/ui/reachable/unreachable-loop-patterns.rs @@ -1,4 +1,3 @@ -#![feature(never_type)] #![feature(exhaustive_patterns)] #![allow(unreachable_code)] diff --git a/src/test/ui/reachable/unreachable-loop-patterns.stderr b/src/test/ui/reachable/unreachable-loop-patterns.stderr index bb5103320d2..6ade480125b 100644 --- a/src/test/ui/reachable/unreachable-loop-patterns.stderr +++ b/src/test/ui/reachable/unreachable-loop-patterns.stderr @@ -1,17 +1,17 @@ error: unreachable pattern - --> $DIR/unreachable-loop-patterns.rs:18:9 + --> $DIR/unreachable-loop-patterns.rs:17:9 | LL | for _ in unimplemented!() as Void {} | ^ | note: lint level defined here - --> $DIR/unreachable-loop-patterns.rs:5:9 + --> $DIR/unreachable-loop-patterns.rs:4:9 | LL | #![deny(unreachable_patterns)] | ^^^^^^^^^^^^^^^^^^^^ error: unreachable pattern - --> $DIR/unreachable-loop-patterns.rs:18:14 + --> $DIR/unreachable-loop-patterns.rs:17:14 | LL | for _ in unimplemented!() as Void {} | ^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/reachable/unreachable-try-pattern.rs b/src/test/ui/reachable/unreachable-try-pattern.rs index 23360e73f4a..e2d89e93a2a 100644 --- a/src/test/ui/reachable/unreachable-try-pattern.rs +++ b/src/test/ui/reachable/unreachable-try-pattern.rs @@ -1,5 +1,5 @@ // check-pass -#![feature(never_type, exhaustive_patterns)] +#![feature(exhaustive_patterns)] #![warn(unreachable_code)] #![warn(unreachable_patterns)] diff --git a/src/test/ui/reachable/unwarned-match-on-never.rs b/src/test/ui/reachable/unwarned-match-on-never.rs index 71f8fe3a783..c38ea6ab9ad 100644 --- a/src/test/ui/reachable/unwarned-match-on-never.rs +++ b/src/test/ui/reachable/unwarned-match-on-never.rs @@ -1,8 +1,6 @@ #![deny(unreachable_code)] #![allow(dead_code)] -#![feature(never_type)] - fn foo(x: !) -> bool { // Explicit matches on the never type are unwarned. match x {} diff --git a/src/test/ui/reachable/unwarned-match-on-never.stderr b/src/test/ui/reachable/unwarned-match-on-never.stderr index 6b2fb4a33c1..6710fcb777f 100644 --- a/src/test/ui/reachable/unwarned-match-on-never.stderr +++ b/src/test/ui/reachable/unwarned-match-on-never.stderr @@ -1,5 +1,5 @@ error: unreachable expression - --> $DIR/unwarned-match-on-never.rs:10:5 + --> $DIR/unwarned-match-on-never.rs:8:5 | LL | match x {} | - any code following this expression is unreachable @@ -14,7 +14,7 @@ LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ error: unreachable arm - --> $DIR/unwarned-match-on-never.rs:15:15 + --> $DIR/unwarned-match-on-never.rs:13:15 | LL | match (return) { | -------- any code following this expression is unreachable @@ -22,7 +22,7 @@ LL | () => () | ^^ unreachable arm error: unreachable expression - --> $DIR/unwarned-match-on-never.rs:21:5 + --> $DIR/unwarned-match-on-never.rs:19:5 | LL | return; | ------ any code following this expression is unreachable diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/auxiliary/uninhabited.rs b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/auxiliary/uninhabited.rs index a2735d4cbfb..e074183a049 100644 --- a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/auxiliary/uninhabited.rs +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/auxiliary/uninhabited.rs @@ -1,5 +1,4 @@ #![crate_type = "rlib"] -#![feature(never_type)] #[non_exhaustive] pub enum UninhabitedEnum { diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions.rs b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions.rs index 80b9dc4c1c3..5684ee6b7bf 100644 --- a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions.rs +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions.rs @@ -1,5 +1,4 @@ // aux-build:uninhabited.rs -#![feature(never_type)] extern crate uninhabited; diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions.stderr b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions.stderr index d05ee1d39ec..dd4b0cd1e87 100644 --- a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions.stderr +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/coercions.rs:23:5 + --> $DIR/coercions.rs:22:5 | LL | fn cannot_coerce_empty_enum_to_anything(x: UninhabitedEnum) -> A { | - expected `A` because of return type @@ -10,7 +10,7 @@ LL | x found type `uninhabited::UninhabitedEnum` error[E0308]: mismatched types - --> $DIR/coercions.rs:27:5 + --> $DIR/coercions.rs:26:5 | LL | fn cannot_coerce_empty_tuple_struct_to_anything(x: UninhabitedTupleStruct) -> A { | - expected `A` because of return type @@ -21,7 +21,7 @@ LL | x found type `uninhabited::UninhabitedTupleStruct` error[E0308]: mismatched types - --> $DIR/coercions.rs:31:5 + --> $DIR/coercions.rs:30:5 | LL | fn cannot_coerce_empty_struct_to_anything(x: UninhabitedStruct) -> A { | - expected `A` because of return type @@ -32,7 +32,7 @@ LL | x found type `uninhabited::UninhabitedStruct` error[E0308]: mismatched types - --> $DIR/coercions.rs:35:5 + --> $DIR/coercions.rs:34:5 | LL | fn cannot_coerce_enum_with_empty_variants_to_anything(x: UninhabitedVariants) -> A { | - expected `A` because of return type diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions_same_crate.rs b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions_same_crate.rs index 6b911dd989c..c3c0ce650d7 100644 --- a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions_same_crate.rs +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions_same_crate.rs @@ -1,5 +1,3 @@ -#![feature(never_type)] - #[non_exhaustive] pub enum UninhabitedEnum { } diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions_same_crate.stderr b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions_same_crate.stderr index a07473dade2..fd49c682398 100644 --- a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions_same_crate.stderr +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions_same_crate.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/coercions_same_crate.rs:30:5 + --> $DIR/coercions_same_crate.rs:28:5 | LL | fn cannot_coerce_empty_enum_to_anything(x: UninhabitedEnum) -> A { | - expected `A` because of return type @@ -10,7 +10,7 @@ LL | x found type `UninhabitedEnum` error[E0308]: mismatched types - --> $DIR/coercions_same_crate.rs:34:5 + --> $DIR/coercions_same_crate.rs:32:5 | LL | fn cannot_coerce_empty_tuple_struct_to_anything(x: UninhabitedTupleStruct) -> A { | - expected `A` because of return type @@ -21,7 +21,7 @@ LL | x found type `UninhabitedTupleStruct` error[E0308]: mismatched types - --> $DIR/coercions_same_crate.rs:38:5 + --> $DIR/coercions_same_crate.rs:36:5 | LL | fn cannot_coerce_empty_struct_to_anything(x: UninhabitedStruct) -> A { | - expected `A` because of return type @@ -32,7 +32,7 @@ LL | x found type `UninhabitedStruct` error[E0308]: mismatched types - --> $DIR/coercions_same_crate.rs:42:5 + --> $DIR/coercions_same_crate.rs:40:5 | LL | fn cannot_coerce_enum_with_empty_variants_to_anything(x: UninhabitedVariants) -> A { | - expected `A` because of return type diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match.rs b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match.rs index 98a7fdbc504..511b6b1bf8f 100644 --- a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match.rs +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match.rs @@ -1,5 +1,4 @@ // aux-build:uninhabited.rs -#![feature(never_type)] extern crate uninhabited; diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match.stderr b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match.stderr index af82022e1da..b903e9b288e 100644 --- a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match.stderr +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match.stderr @@ -1,5 +1,5 @@ error[E0004]: non-exhaustive patterns: pattern `IndirectUninhabitedEnum` of type `uninhabited::IndirectUninhabitedEnum` is not handled - --> $DIR/indirect_match.rs:19:11 + --> $DIR/indirect_match.rs:18:11 | LL | match x {} | ^ @@ -7,7 +7,7 @@ LL | match x {} = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms error[E0004]: non-exhaustive patterns: pattern `IndirectUninhabitedStruct` of type `uninhabited::IndirectUninhabitedStruct` is not handled - --> $DIR/indirect_match.rs:23:11 + --> $DIR/indirect_match.rs:22:11 | LL | match x {} | ^ @@ -15,7 +15,7 @@ LL | match x {} = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms error[E0004]: non-exhaustive patterns: pattern `IndirectUninhabitedTupleStruct` of type `uninhabited::IndirectUninhabitedTupleStruct` is not handled - --> $DIR/indirect_match.rs:27:11 + --> $DIR/indirect_match.rs:26:11 | LL | match x {} | ^ @@ -23,7 +23,7 @@ LL | match x {} = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms error[E0004]: non-exhaustive patterns: pattern `IndirectUninhabitedVariants` of type `uninhabited::IndirectUninhabitedVariants` is not handled - --> $DIR/indirect_match.rs:33:11 + --> $DIR/indirect_match.rs:32:11 | LL | match x {} | ^ diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match_same_crate.rs b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match_same_crate.rs index 8f090fe886a..9c3ec4240a5 100644 --- a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match_same_crate.rs +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match_same_crate.rs @@ -1,5 +1,3 @@ -#![feature(never_type)] - #[non_exhaustive] pub enum UninhabitedEnum { } diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match_same_crate.stderr b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match_same_crate.stderr index c03018a5236..f94616dc64b 100644 --- a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match_same_crate.stderr +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match_same_crate.stderr @@ -1,5 +1,5 @@ error[E0004]: non-exhaustive patterns: pattern `IndirectUninhabitedEnum` of type `IndirectUninhabitedEnum` is not handled - --> $DIR/indirect_match_same_crate.rs:34:11 + --> $DIR/indirect_match_same_crate.rs:32:11 | LL | pub struct IndirectUninhabitedEnum(UninhabitedEnum); | ---------------------------------------------------- @@ -13,7 +13,7 @@ LL | match x {} = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms error[E0004]: non-exhaustive patterns: pattern `IndirectUninhabitedStruct` of type `IndirectUninhabitedStruct` is not handled - --> $DIR/indirect_match_same_crate.rs:38:11 + --> $DIR/indirect_match_same_crate.rs:36:11 | LL | pub struct IndirectUninhabitedStruct(UninhabitedStruct); | -------------------------------------------------------- @@ -27,7 +27,7 @@ LL | match x {} = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms error[E0004]: non-exhaustive patterns: pattern `IndirectUninhabitedTupleStruct` of type `IndirectUninhabitedTupleStruct` is not handled - --> $DIR/indirect_match_same_crate.rs:42:11 + --> $DIR/indirect_match_same_crate.rs:40:11 | LL | pub struct IndirectUninhabitedTupleStruct(UninhabitedTupleStruct); | ------------------------------------------------------------------ @@ -41,7 +41,7 @@ LL | match x {} = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms error[E0004]: non-exhaustive patterns: pattern `IndirectUninhabitedVariants` of type `IndirectUninhabitedVariants` is not handled - --> $DIR/indirect_match_same_crate.rs:48:11 + --> $DIR/indirect_match_same_crate.rs:46:11 | LL | pub struct IndirectUninhabitedVariants(UninhabitedVariants); | ------------------------------------------------------------ diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match_with_exhaustive_patterns.rs b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match_with_exhaustive_patterns.rs index be86519ecb1..68ac42ef587 100644 --- a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match_with_exhaustive_patterns.rs +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match_with_exhaustive_patterns.rs @@ -1,7 +1,6 @@ // aux-build:uninhabited.rs #![deny(unreachable_patterns)] #![feature(exhaustive_patterns)] -#![feature(never_type)] extern crate uninhabited; diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match_with_exhaustive_patterns.stderr b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match_with_exhaustive_patterns.stderr index 17a8d010072..2c2e5429341 100644 --- a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match_with_exhaustive_patterns.stderr +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match_with_exhaustive_patterns.stderr @@ -1,5 +1,5 @@ error[E0004]: non-exhaustive patterns: type `uninhabited::IndirectUninhabitedEnum` is non-empty - --> $DIR/indirect_match_with_exhaustive_patterns.rs:23:11 + --> $DIR/indirect_match_with_exhaustive_patterns.rs:22:11 | LL | match x {} | ^ @@ -7,7 +7,7 @@ LL | match x {} = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms error[E0004]: non-exhaustive patterns: type `uninhabited::IndirectUninhabitedStruct` is non-empty - --> $DIR/indirect_match_with_exhaustive_patterns.rs:27:11 + --> $DIR/indirect_match_with_exhaustive_patterns.rs:26:11 | LL | match x {} | ^ @@ -15,7 +15,7 @@ LL | match x {} = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms error[E0004]: non-exhaustive patterns: type `uninhabited::IndirectUninhabitedTupleStruct` is non-empty - --> $DIR/indirect_match_with_exhaustive_patterns.rs:31:11 + --> $DIR/indirect_match_with_exhaustive_patterns.rs:30:11 | LL | match x {} | ^ @@ -23,7 +23,7 @@ LL | match x {} = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms error[E0004]: non-exhaustive patterns: type `uninhabited::IndirectUninhabitedVariants` is non-empty - --> $DIR/indirect_match_with_exhaustive_patterns.rs:37:11 + --> $DIR/indirect_match_with_exhaustive_patterns.rs:36:11 | LL | match x {} | ^ diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match_with_exhaustive_patterns_same_crate.rs b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match_with_exhaustive_patterns_same_crate.rs index 60289aa7803..06c318414f0 100644 --- a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match_with_exhaustive_patterns_same_crate.rs +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match_with_exhaustive_patterns_same_crate.rs @@ -2,7 +2,6 @@ #![deny(unreachable_patterns)] #![feature(exhaustive_patterns)] -#![feature(never_type)] #[non_exhaustive] pub enum UninhabitedEnum { diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match.rs b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match.rs index e54098d4d48..fd3dbca04c0 100644 --- a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match.rs +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match.rs @@ -1,5 +1,4 @@ // aux-build:uninhabited.rs -#![feature(never_type)] extern crate uninhabited; diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match.stderr b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match.stderr index de39688f45a..de3fa900cd6 100644 --- a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match.stderr +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match.stderr @@ -1,5 +1,5 @@ error[E0004]: non-exhaustive patterns: type `uninhabited::UninhabitedEnum` is non-empty - --> $DIR/match.rs:19:11 + --> $DIR/match.rs:18:11 | LL | match x {} | ^ @@ -7,7 +7,7 @@ LL | match x {} = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms error[E0004]: non-exhaustive patterns: pattern `UninhabitedStruct` of type `uninhabited::UninhabitedStruct` is not handled - --> $DIR/match.rs:23:11 + --> $DIR/match.rs:22:11 | LL | match x {} | ^ @@ -15,7 +15,7 @@ LL | match x {} = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms error[E0004]: non-exhaustive patterns: pattern `UninhabitedTupleStruct` of type `uninhabited::UninhabitedTupleStruct` is not handled - --> $DIR/match.rs:27:11 + --> $DIR/match.rs:26:11 | LL | match x {} | ^ @@ -23,7 +23,7 @@ LL | match x {} = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms error[E0004]: non-exhaustive patterns: multiple patterns of type `uninhabited::UninhabitedVariants` are not handled - --> $DIR/match.rs:31:11 + --> $DIR/match.rs:30:11 | LL | match x {} | ^ diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_same_crate.rs b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_same_crate.rs index ebbdfba15f3..c31688add91 100644 --- a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_same_crate.rs +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_same_crate.rs @@ -1,5 +1,3 @@ -#![feature(never_type)] - #[non_exhaustive] pub enum UninhabitedEnum { } diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_same_crate.stderr b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_same_crate.stderr index c39df05a8f7..3dd1a914d55 100644 --- a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_same_crate.stderr +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_same_crate.stderr @@ -1,5 +1,5 @@ error[E0004]: non-exhaustive patterns: pattern `UninhabitedStruct` of type `UninhabitedStruct` is not handled - --> $DIR/match_same_crate.rs:30:11 + --> $DIR/match_same_crate.rs:28:11 | LL | pub struct UninhabitedStruct { | - ----------------- variant not covered @@ -15,7 +15,7 @@ LL | match x {} = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms error[E0004]: non-exhaustive patterns: pattern `UninhabitedTupleStruct` of type `UninhabitedTupleStruct` is not handled - --> $DIR/match_same_crate.rs:34:11 + --> $DIR/match_same_crate.rs:32:11 | LL | pub struct UninhabitedTupleStruct(!); | ------------------------------------- @@ -29,7 +29,7 @@ LL | match x {} = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms error[E0004]: non-exhaustive patterns: multiple patterns of type `UninhabitedVariants` are not handled - --> $DIR/match_same_crate.rs:38:11 + --> $DIR/match_same_crate.rs:36:11 | LL | / pub enum UninhabitedVariants { LL | | #[non_exhaustive] Tuple(!), diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns.rs b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns.rs index 900dfff652e..37d739834d2 100644 --- a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns.rs +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns.rs @@ -1,7 +1,6 @@ // aux-build:uninhabited.rs #![deny(unreachable_patterns)] #![feature(exhaustive_patterns)] -#![feature(never_type)] extern crate uninhabited; diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns.stderr b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns.stderr index 48a888bc50b..3b56c689071 100644 --- a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns.stderr +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns.stderr @@ -1,5 +1,5 @@ error[E0004]: non-exhaustive patterns: type `uninhabited::UninhabitedEnum` is non-empty - --> $DIR/match_with_exhaustive_patterns.rs:22:11 + --> $DIR/match_with_exhaustive_patterns.rs:21:11 | LL | match x {} | ^ @@ -7,7 +7,7 @@ LL | match x {} = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms error[E0004]: non-exhaustive patterns: type `uninhabited::UninhabitedStruct` is non-empty - --> $DIR/match_with_exhaustive_patterns.rs:26:11 + --> $DIR/match_with_exhaustive_patterns.rs:25:11 | LL | match x {} | ^ @@ -15,7 +15,7 @@ LL | match x {} = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms error[E0004]: non-exhaustive patterns: type `uninhabited::UninhabitedTupleStruct` is non-empty - --> $DIR/match_with_exhaustive_patterns.rs:30:11 + --> $DIR/match_with_exhaustive_patterns.rs:29:11 | LL | match x {} | ^ @@ -23,7 +23,7 @@ LL | match x {} = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms error[E0004]: non-exhaustive patterns: type `uninhabited::UninhabitedVariants` is non-empty - --> $DIR/match_with_exhaustive_patterns.rs:34:11 + --> $DIR/match_with_exhaustive_patterns.rs:33:11 | LL | match x {} | ^ diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns_same_crate.rs b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns_same_crate.rs index de5530485f3..2b2e4b6e77d 100644 --- a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns_same_crate.rs +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns_same_crate.rs @@ -2,7 +2,6 @@ #![deny(unreachable_patterns)] #![feature(exhaustive_patterns)] -#![feature(never_type)] #[non_exhaustive] pub enum UninhabitedEnum { diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/patterns_same_crate.rs b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/patterns_same_crate.rs index ffc496a975e..3d4cca4505e 100644 --- a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/patterns_same_crate.rs +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/patterns_same_crate.rs @@ -1,6 +1,5 @@ #![deny(unreachable_patterns)] #![feature(exhaustive_patterns)] -#![feature(never_type)] #[non_exhaustive] pub enum UninhabitedEnum { diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/patterns_same_crate.stderr b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/patterns_same_crate.stderr index e3de94be128..fea883f8912 100644 --- a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/patterns_same_crate.stderr +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/patterns_same_crate.stderr @@ -1,5 +1,5 @@ error: unreachable pattern - --> $DIR/patterns_same_crate.rs:52:9 + --> $DIR/patterns_same_crate.rs:51:9 | LL | Some(_x) => (), | ^^^^^^^^ @@ -11,25 +11,25 @@ LL | #![deny(unreachable_patterns)] | ^^^^^^^^^^^^^^^^^^^^ error: unreachable pattern - --> $DIR/patterns_same_crate.rs:57:9 + --> $DIR/patterns_same_crate.rs:56:9 | LL | Some(_x) => (), | ^^^^^^^^ error: unreachable pattern - --> $DIR/patterns_same_crate.rs:61:15 + --> $DIR/patterns_same_crate.rs:60:15 | LL | while let PartiallyInhabitedVariants::Struct { x } = partially_inhabited_variant() { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: unreachable pattern - --> $DIR/patterns_same_crate.rs:65:15 + --> $DIR/patterns_same_crate.rs:64:15 | LL | while let Some(_x) = uninhabited_struct() { | ^^^^^^^^ error: unreachable pattern - --> $DIR/patterns_same_crate.rs:68:15 + --> $DIR/patterns_same_crate.rs:67:15 | LL | while let Some(_x) = uninhabited_tuple_struct() { | ^^^^^^^^ diff --git a/src/test/ui/traits/reservation-impls/reservation-impl-non-lattice-ok.rs b/src/test/ui/traits/reservation-impls/reservation-impl-non-lattice-ok.rs index f14589ccf84..0e0197803b7 100644 --- a/src/test/ui/traits/reservation-impls/reservation-impl-non-lattice-ok.rs +++ b/src/test/ui/traits/reservation-impls/reservation-impl-non-lattice-ok.rs @@ -30,7 +30,7 @@ // // [ii]: http://smallcultfollowing.com/babysteps/blog/2016/09/24/intersection-impls/ -#![feature(rustc_attrs, never_type)] +#![feature(rustc_attrs)] trait MyTrait {} diff --git a/src/test/ui/type-alias-impl-trait/different_defining_uses_never_type.stderr b/src/test/ui/type-alias-impl-trait/different_defining_uses_never_type.stderr index 5be656e8f44..e6c7b566b44 100644 --- a/src/test/ui/type-alias-impl-trait/different_defining_uses_never_type.stderr +++ b/src/test/ui/type-alias-impl-trait/different_defining_uses_never_type.stderr @@ -4,7 +4,7 @@ error: concrete type differs from previous defining opaque type use LL | / fn bar() -> Foo { LL | | panic!() LL | | } - | |_^ expected `&'static str`, got `()` + | |_^ expected `&'static str`, got `!` | note: previous use here --> $DIR/different_defining_uses_never_type.rs:8:1 @@ -20,7 +20,7 @@ error: concrete type differs from previous defining opaque type use LL | / fn boo() -> Foo { LL | | loop {} LL | | } - | |_^ expected `&'static str`, got `()` + | |_^ expected `&'static str`, got `!` | note: previous use here --> $DIR/different_defining_uses_never_type.rs:8:1 diff --git a/src/test/ui/type-sizes.rs b/src/test/ui/type-sizes.rs index 27433fd770b..3dfe0ad7f72 100644 --- a/src/test/ui/type-sizes.rs +++ b/src/test/ui/type-sizes.rs @@ -2,7 +2,6 @@ #![allow(non_camel_case_types)] #![allow(dead_code)] -#![feature(never_type)] use std::mem::size_of; diff --git a/src/test/ui/uninhabited/uninhabited-irrefutable.rs b/src/test/ui/uninhabited/uninhabited-irrefutable.rs index 48cd92719b4..84daa35484f 100644 --- a/src/test/ui/uninhabited/uninhabited-irrefutable.rs +++ b/src/test/ui/uninhabited/uninhabited-irrefutable.rs @@ -1,4 +1,3 @@ -#![feature(never_type)] #![feature(exhaustive_patterns)] mod foo { diff --git a/src/test/ui/uninhabited/uninhabited-irrefutable.stderr b/src/test/ui/uninhabited/uninhabited-irrefutable.stderr index 26e1be34ea7..6ba03ee5083 100644 --- a/src/test/ui/uninhabited/uninhabited-irrefutable.stderr +++ b/src/test/ui/uninhabited/uninhabited-irrefutable.stderr @@ -1,5 +1,5 @@ error[E0005]: refutable pattern in local binding: `A(_)` not covered - --> $DIR/uninhabited-irrefutable.rs:27:9 + --> $DIR/uninhabited-irrefutable.rs:26:9 | LL | / enum Foo { LL | | A(foo::SecretlyEmpty), diff --git a/src/test/ui/uninhabited/uninhabited-patterns.rs b/src/test/ui/uninhabited/uninhabited-patterns.rs index 1bf01184a08..66a1a7f7735 100644 --- a/src/test/ui/uninhabited/uninhabited-patterns.rs +++ b/src/test/ui/uninhabited/uninhabited-patterns.rs @@ -1,6 +1,5 @@ #![feature(box_patterns)] #![feature(box_syntax)] -#![feature(never_type)] #![feature(exhaustive_patterns)] #![feature(slice_patterns)] #![deny(unreachable_patterns)] diff --git a/src/test/ui/uninhabited/uninhabited-patterns.stderr b/src/test/ui/uninhabited/uninhabited-patterns.stderr index 3e5329cfb30..4a793c4510e 100644 --- a/src/test/ui/uninhabited/uninhabited-patterns.stderr +++ b/src/test/ui/uninhabited/uninhabited-patterns.stderr @@ -1,35 +1,35 @@ error: unreachable pattern - --> $DIR/uninhabited-patterns.rs:27:9 + --> $DIR/uninhabited-patterns.rs:26:9 | LL | &[..] => (), | ^^^^^ | note: lint level defined here - --> $DIR/uninhabited-patterns.rs:6:9 + --> $DIR/uninhabited-patterns.rs:5:9 | LL | #![deny(unreachable_patterns)] | ^^^^^^^^^^^^^^^^^^^^ error: unreachable pattern - --> $DIR/uninhabited-patterns.rs:32:9 + --> $DIR/uninhabited-patterns.rs:31:9 | LL | Ok(box _) => (), | ^^^^^^^^^ error: unreachable pattern - --> $DIR/uninhabited-patterns.rs:34:9 + --> $DIR/uninhabited-patterns.rs:33:9 | LL | Err(&[..]) => (), | ^^^^^^^^^^ error: unreachable pattern - --> $DIR/uninhabited-patterns.rs:41:9 + --> $DIR/uninhabited-patterns.rs:40:9 | LL | Err(Ok(_y)) => (), | ^^^^^^^^^^^ error: unreachable pattern - --> $DIR/uninhabited-patterns.rs:44:15 + --> $DIR/uninhabited-patterns.rs:43:15 | LL | while let Some(_y) = foo() { | ^^^^^^^^ |
