diff --git a/src/test/mir-opt/retain-never-const.rs b/src/test/mir-opt/retain-never-const.rs index 5d59b2f4842..04394dcdf13 100644 --- a/src/test/mir-opt/retain-never-const.rs +++ b/src/test/mir-opt/retain-never-const.rs @@ -5,6 +5,7 @@ // compile-flags: --emit mir,link #![feature(const_panic)] +#![feature(never_type)] struct PrintName(T); diff --git a/src/test/ui/consts/const-eval/index-out-of-bounds-never-type.rs b/src/test/ui/consts/const-eval/index-out-of-bounds-never-type.rs index 516ca4f3f77..f6ab0bd7dbe 100644 --- a/src/test/ui/consts/const-eval/index-out-of-bounds-never-type.rs +++ b/src/test/ui/consts/const-eval/index-out-of-bounds-never-type.rs @@ -1,5 +1,6 @@ // Regression test for #66975 #![warn(const_err)] +#![feature(never_type)] struct PrintName(T); diff --git a/src/test/ui/consts/const-eval/index-out-of-bounds-never-type.stderr b/src/test/ui/consts/const-eval/index-out-of-bounds-never-type.stderr index e2bd8d0cc85..24830f7344c 100644 --- a/src/test/ui/consts/const-eval/index-out-of-bounds-never-type.stderr +++ b/src/test/ui/consts/const-eval/index-out-of-bounds-never-type.stderr @@ -1,5 +1,5 @@ warning: any use of this value will cause an error - --> $DIR/index-out-of-bounds-never-type.rs:7:61 + --> $DIR/index-out-of-bounds-never-type.rs:8:61 | LL | const VOID: ! = { let x = 0 * std::mem::size_of::(); [][x] }; | --------------------------------------------------------^^^^^--- @@ -13,7 +13,7 @@ LL | #![warn(const_err)] | ^^^^^^^^^ error: erroneous constant encountered - --> $DIR/index-out-of-bounds-never-type.rs:12:13 + --> $DIR/index-out-of-bounds-never-type.rs:13:13 | LL | let _ = PrintName::::VOID; | ^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/consts/const-eval/panic-assoc-never-type.rs b/src/test/ui/consts/const-eval/panic-assoc-never-type.rs index b39d9af5546..a7cbdb40ef1 100644 --- a/src/test/ui/consts/const-eval/panic-assoc-never-type.rs +++ b/src/test/ui/consts/const-eval/panic-assoc-never-type.rs @@ -1,6 +1,7 @@ // Regression test for #66975 #![warn(const_err)] #![feature(const_panic)] +#![feature(never_type)] struct PrintName; diff --git a/src/test/ui/consts/const-eval/panic-assoc-never-type.stderr b/src/test/ui/consts/const-eval/panic-assoc-never-type.stderr index c07c8c65a2f..e15952c20e4 100644 --- a/src/test/ui/consts/const-eval/panic-assoc-never-type.stderr +++ b/src/test/ui/consts/const-eval/panic-assoc-never-type.stderr @@ -1,10 +1,10 @@ warning: any use of this value will cause an error - --> $DIR/panic-assoc-never-type.rs:8:21 + --> $DIR/panic-assoc-never-type.rs:9:21 | LL | const VOID: ! = panic!(); | ----------------^^^^^^^^- | | - | the evaluated program panicked at 'explicit panic', $DIR/panic-assoc-never-type.rs:8:21 + | the evaluated program panicked at 'explicit panic', $DIR/panic-assoc-never-type.rs:9:21 | note: lint level defined here --> $DIR/panic-assoc-never-type.rs:2:9 @@ -14,7 +14,7 @@ LL | #![warn(const_err)] = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) error[E0080]: erroneous constant used - --> $DIR/panic-assoc-never-type.rs:13:13 + --> $DIR/panic-assoc-never-type.rs:14:13 | LL | let _ = PrintName::VOID; | ^^^^^^^^^^^^^^^ referenced constant has errors diff --git a/src/test/ui/consts/const-eval/panic-never-type.rs b/src/test/ui/consts/const-eval/panic-never-type.rs index 42eabbf5847..b1a7d8ae676 100644 --- a/src/test/ui/consts/const-eval/panic-never-type.rs +++ b/src/test/ui/consts/const-eval/panic-never-type.rs @@ -1,6 +1,7 @@ // Regression test for #66975 #![warn(const_err)] #![feature(const_panic)] +#![feature(never_type)] const VOID: ! = panic!(); //~^ WARN any use of this value will cause an error diff --git a/src/test/ui/consts/const-eval/panic-never-type.stderr b/src/test/ui/consts/const-eval/panic-never-type.stderr index 4fb11a61525..9e91fdf4514 100644 --- a/src/test/ui/consts/const-eval/panic-never-type.stderr +++ b/src/test/ui/consts/const-eval/panic-never-type.stderr @@ -1,10 +1,10 @@ warning: any use of this value will cause an error - --> $DIR/panic-never-type.rs:5:17 + --> $DIR/panic-never-type.rs:6:17 | LL | const VOID: ! = panic!(); | ----------------^^^^^^^^- | | - | the evaluated program panicked at 'explicit panic', $DIR/panic-never-type.rs:5:17 + | the evaluated program panicked at 'explicit panic', $DIR/panic-never-type.rs:6:17 | note: lint level defined here --> $DIR/panic-never-type.rs:2:9 @@ -14,7 +14,7 @@ LL | #![warn(const_err)] = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) error[E0080]: erroneous constant used - --> $DIR/panic-never-type.rs:9:13 + --> $DIR/panic-never-type.rs:10:13 | LL | let _ = VOID; | ^^^^ referenced constant has errors diff --git a/src/test/ui/loops/loop-break-value.stderr b/src/test/ui/loops/loop-break-value.stderr index e1568754f97..3bb0cd50d63 100644 --- a/src/test/ui/loops/loop-break-value.stderr +++ b/src/test/ui/loops/loop-break-value.stderr @@ -29,7 +29,7 @@ LL | break; | ^^^^^ error[E0571]: `break` with value from a `while` loop - --> $DIR/loop-break-value.rs:36:12 + --> $DIR/loop-break-value.rs:38: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` loop - --> $DIR/loop-break-value.rs:41:9 + --> $DIR/loop-break-value.rs:43: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` loop - --> $DIR/loop-break-value.rs:47:13 + --> $DIR/loop-break-value.rs:49:13 | LL | break 'while_let_loop "nope"; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can only break with a value inside `loop` or breakable block diff --git a/src/test/ui/never_type/auto-traits.rs b/src/test/ui/never_type/auto-traits.rs index 8a02720ab27..2d9689888cb 100644 --- a/src/test/ui/never_type/auto-traits.rs +++ b/src/test/ui/never_type/auto-traits.rs @@ -1,6 +1,7 @@ // check-pass #![feature(optin_builtin_traits)] +#![feature(never_type)] fn main() { enum Void {}