diff --git a/src/test/ui/asm/issue-51431.rs b/src/test/ui/asm/issue-51431.rs index d29c31fafc2..4cef42d17d6 100644 --- a/src/test/ui/asm/issue-51431.rs +++ b/src/test/ui/asm/issue-51431.rs @@ -1,3 +1,4 @@ +// build-fail // ignore-emscripten no asm! support #![feature(asm)] diff --git a/src/test/ui/asm/issue-51431.stderr b/src/test/ui/asm/issue-51431.stderr index f78d1831973..a024f3311f1 100644 --- a/src/test/ui/asm/issue-51431.stderr +++ b/src/test/ui/asm/issue-51431.stderr @@ -1,5 +1,5 @@ error[E0669]: invalid value for constraint in inline assembly - --> $DIR/issue-51431.rs:7:32 + --> $DIR/issue-51431.rs:8:32 | LL | asm! {"mov $0,$1"::"0"("bx"),"1"(0x00)} | ^^^^ diff --git a/src/test/ui/bad/bad-intrinsic-monomorphization.rs b/src/test/ui/bad/bad-intrinsic-monomorphization.rs index a29723f34b4..f36a5f1acc1 100644 --- a/src/test/ui/bad/bad-intrinsic-monomorphization.rs +++ b/src/test/ui/bad/bad-intrinsic-monomorphization.rs @@ -1,3 +1,5 @@ +// build-fail + #![feature(repr_simd, platform_intrinsics, core_intrinsics)] #![allow(warnings)] #![crate_type = "rlib"] diff --git a/src/test/ui/bad/bad-intrinsic-monomorphization.stderr b/src/test/ui/bad/bad-intrinsic-monomorphization.stderr index dee33f574d8..c070f018181 100644 --- a/src/test/ui/bad/bad-intrinsic-monomorphization.stderr +++ b/src/test/ui/bad/bad-intrinsic-monomorphization.stderr @@ -1,17 +1,17 @@ error[E0511]: invalid monomorphization of `cttz` intrinsic: expected basic integer type, found `Foo` - --> $DIR/bad-intrinsic-monomorphization.rs:18:5 + --> $DIR/bad-intrinsic-monomorphization.rs:20:5 | LL | intrinsics::cttz(v) | ^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `fadd_fast` intrinsic: expected basic float type, found `Foo` - --> $DIR/bad-intrinsic-monomorphization.rs:23:5 + --> $DIR/bad-intrinsic-monomorphization.rs:25:5 | LL | intrinsics::fadd_fast(a, b) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_add` intrinsic: expected SIMD input type, found non-SIMD `Foo` - --> $DIR/bad-intrinsic-monomorphization.rs:28:5 + --> $DIR/bad-intrinsic-monomorphization.rs:30:5 | LL | simd_add(a, b) | ^^^^^^^^^^^^^^ diff --git a/src/test/ui/cdylib-deps-must-be-static.rs b/src/test/ui/cdylib-deps-must-be-static.rs index 8530c9e24b2..abf954d8fb2 100644 --- a/src/test/ui/cdylib-deps-must-be-static.rs +++ b/src/test/ui/cdylib-deps-must-be-static.rs @@ -1,3 +1,4 @@ +// build-fail // error-pattern: crate `cdylib_dep` required to be available in rlib format, but was not found // aux-build:cdylib-dep.rs // ignore-musl diff --git a/src/test/ui/consts/array-literal-index-oob.rs b/src/test/ui/consts/array-literal-index-oob.rs index 492182921ba..1de6bafd293 100644 --- a/src/test/ui/consts/array-literal-index-oob.rs +++ b/src/test/ui/consts/array-literal-index-oob.rs @@ -1,3 +1,5 @@ +// build-fail + fn main() { &{[1, 2, 3][4]}; //~^ ERROR index out of bounds diff --git a/src/test/ui/consts/array-literal-index-oob.stderr b/src/test/ui/consts/array-literal-index-oob.stderr index f4d4e6f969b..f3ef16659dd 100644 --- a/src/test/ui/consts/array-literal-index-oob.stderr +++ b/src/test/ui/consts/array-literal-index-oob.stderr @@ -1,5 +1,5 @@ error: index out of bounds: the len is 3 but the index is 4 - --> $DIR/array-literal-index-oob.rs:2:7 + --> $DIR/array-literal-index-oob.rs:4:7 | LL | &{[1, 2, 3][4]}; | ^^^^^^^^^^^^ @@ -7,7 +7,7 @@ LL | &{[1, 2, 3][4]}; = note: `#[deny(const_err)]` on by default error: reaching this expression at runtime will panic or abort - --> $DIR/array-literal-index-oob.rs:2:7 + --> $DIR/array-literal-index-oob.rs:4:7 | LL | &{[1, 2, 3][4]}; | --^^^^^^^^^^^^- diff --git a/src/test/ui/consts/assoc_const_generic_impl.rs b/src/test/ui/consts/assoc_const_generic_impl.rs index 62702a8ec5c..83f334dca9e 100644 --- a/src/test/ui/consts/assoc_const_generic_impl.rs +++ b/src/test/ui/consts/assoc_const_generic_impl.rs @@ -1,3 +1,5 @@ +// build-fail + #![warn(const_err)] trait ZeroSized: Sized { diff --git a/src/test/ui/consts/assoc_const_generic_impl.stderr b/src/test/ui/consts/assoc_const_generic_impl.stderr index a114d5c6ccd..4b13f52e762 100644 --- a/src/test/ui/consts/assoc_const_generic_impl.stderr +++ b/src/test/ui/consts/assoc_const_generic_impl.stderr @@ -1,5 +1,5 @@ warning: any use of this value will cause an error - --> $DIR/assoc_const_generic_impl.rs:9:34 + --> $DIR/assoc_const_generic_impl.rs:11:34 | LL | const I_AM_ZERO_SIZED: () = [()][std::mem::size_of::()]; | -----------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- @@ -7,13 +7,13 @@ LL | const I_AM_ZERO_SIZED: () = [()][std::mem::size_of::()]; | index out of bounds: the len is 1 but the index is 4 | note: lint level defined here - --> $DIR/assoc_const_generic_impl.rs:1:9 + --> $DIR/assoc_const_generic_impl.rs:3:9 | LL | #![warn(const_err)] | ^^^^^^^^^ error: erroneous constant encountered - --> $DIR/assoc_const_generic_impl.rs:11:18 + --> $DIR/assoc_const_generic_impl.rs:13:18 | LL | let () = Self::I_AM_ZERO_SIZED; | ^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/consts/const-err.rs b/src/test/ui/consts/const-err.rs index 7dfcda69058..b204f705a96 100644 --- a/src/test/ui/consts/const-err.rs +++ b/src/test/ui/consts/const-err.rs @@ -1,3 +1,4 @@ +// build-fail // compile-flags: -Zforce-overflow-checks=on #![allow(exceeding_bitshifts)] diff --git a/src/test/ui/consts/const-err.stderr b/src/test/ui/consts/const-err.stderr index 429e2ae7600..495b221d7d7 100644 --- a/src/test/ui/consts/const-err.stderr +++ b/src/test/ui/consts/const-err.stderr @@ -1,5 +1,5 @@ warning: any use of this value will cause an error - --> $DIR/const-err.rs:10:17 + --> $DIR/const-err.rs:11:17 | LL | const FOO: u8 = [5u8][1]; | ----------------^^^^^^^^- @@ -7,19 +7,19 @@ LL | const FOO: u8 = [5u8][1]; | index out of bounds: the len is 1 but the index is 1 | note: lint level defined here - --> $DIR/const-err.rs:4:9 + --> $DIR/const-err.rs:5:9 | LL | #![warn(const_err)] | ^^^^^^^^^ error[E0080]: erroneous constant used - --> $DIR/const-err.rs:14:16 + --> $DIR/const-err.rs:15:16 | LL | black_box((FOO, FOO)); | ^^^ referenced constant has errors error[E0080]: erroneous constant used - --> $DIR/const-err.rs:14:21 + --> $DIR/const-err.rs:15:21 | LL | black_box((FOO, FOO)); | ^^^ referenced constant has errors diff --git a/src/test/ui/consts/const-err2.rs b/src/test/ui/consts/const-err2.rs index ecbcc2a4b49..351dfd2e0f5 100644 --- a/src/test/ui/consts/const-err2.rs +++ b/src/test/ui/consts/const-err2.rs @@ -1,6 +1,8 @@ // needed because negating int::MIN will behave differently between // optimized compilation and unoptimized compilation and thus would // lead to different lints being emitted + +// build-fail // compile-flags: -O #![feature(rustc_attrs)] diff --git a/src/test/ui/consts/const-err2.stderr b/src/test/ui/consts/const-err2.stderr index 1d84d44dc27..2ca1019d494 100644 --- a/src/test/ui/consts/const-err2.stderr +++ b/src/test/ui/consts/const-err2.stderr @@ -1,35 +1,35 @@ error: this expression will panic at runtime - --> $DIR/const-err2.rs:16:13 + --> $DIR/const-err2.rs:18:13 | LL | let a = -std::i8::MIN; | ^^^^^^^^^^^^^ attempt to negate with overflow | note: lint level defined here - --> $DIR/const-err2.rs:9:9 + --> $DIR/const-err2.rs:11:9 | LL | #![deny(const_err)] | ^^^^^^^^^ error: this expression will panic at runtime - --> $DIR/const-err2.rs:18:13 + --> $DIR/const-err2.rs:20:13 | LL | let b = 200u8 + 200u8 + 200u8; | ^^^^^^^^^^^^^ attempt to add with overflow error: this expression will panic at runtime - --> $DIR/const-err2.rs:20:13 + --> $DIR/const-err2.rs:22:13 | LL | let c = 200u8 * 4; | ^^^^^^^^^ attempt to multiply with overflow error: this expression will panic at runtime - --> $DIR/const-err2.rs:22:13 + --> $DIR/const-err2.rs:24:13 | LL | let d = 42u8 - (42u8 + 1); | ^^^^^^^^^^^^^^^^^ attempt to subtract with overflow error: index out of bounds: the len is 1 but the index is 1 - --> $DIR/const-err2.rs:24:14 + --> $DIR/const-err2.rs:26:14 | LL | let _e = [5u8][1]; | ^^^^^^^^ diff --git a/src/test/ui/consts/const-err3.rs b/src/test/ui/consts/const-err3.rs index a9cf04cda7a..ab3823efd30 100644 --- a/src/test/ui/consts/const-err3.rs +++ b/src/test/ui/consts/const-err3.rs @@ -1,6 +1,8 @@ // needed because negating int::MIN will behave differently between // optimized compilation and unoptimized compilation and thus would // lead to different lints being emitted + +// build-fail // compile-flags: -C overflow-checks=on -O #![feature(rustc_attrs)] diff --git a/src/test/ui/consts/const-err3.stderr b/src/test/ui/consts/const-err3.stderr index 0602707be70..c374637bec2 100644 --- a/src/test/ui/consts/const-err3.stderr +++ b/src/test/ui/consts/const-err3.stderr @@ -1,35 +1,35 @@ error: attempt to negate with overflow - --> $DIR/const-err3.rs:16:13 + --> $DIR/const-err3.rs:18:13 | LL | let a = -std::i8::MIN; | ^^^^^^^^^^^^^ | note: lint level defined here - --> $DIR/const-err3.rs:9:9 + --> $DIR/const-err3.rs:11:9 | LL | #![deny(const_err)] | ^^^^^^^^^ error: attempt to add with overflow - --> $DIR/const-err3.rs:18:13 + --> $DIR/const-err3.rs:20:13 | LL | let b = 200u8 + 200u8 + 200u8; | ^^^^^^^^^^^^^ error: attempt to multiply with overflow - --> $DIR/const-err3.rs:20:13 + --> $DIR/const-err3.rs:22:13 | LL | let c = 200u8 * 4; | ^^^^^^^^^ error: attempt to subtract with overflow - --> $DIR/const-err3.rs:22:13 + --> $DIR/const-err3.rs:24:13 | LL | let d = 42u8 - (42u8 + 1); | ^^^^^^^^^^^^^^^^^ error: index out of bounds: the len is 1 but the index is 1 - --> $DIR/const-err3.rs:24:14 + --> $DIR/const-err3.rs:26:14 | LL | let _e = [5u8][1]; | ^^^^^^^^ diff --git a/src/test/ui/consts/const-eval/conditional_array_execution.rs b/src/test/ui/consts/const-eval/conditional_array_execution.rs index 12e51c24605..96f67c92a5e 100644 --- a/src/test/ui/consts/const-eval/conditional_array_execution.rs +++ b/src/test/ui/consts/const-eval/conditional_array_execution.rs @@ -1,3 +1,5 @@ +// build-fail + #![warn(const_err)] const X: u32 = 5; diff --git a/src/test/ui/consts/const-eval/conditional_array_execution.stderr b/src/test/ui/consts/const-eval/conditional_array_execution.stderr index 7f94d849c00..ec18f8f011d 100644 --- a/src/test/ui/consts/const-eval/conditional_array_execution.stderr +++ b/src/test/ui/consts/const-eval/conditional_array_execution.stderr @@ -1,5 +1,5 @@ warning: any use of this value will cause an error - --> $DIR/conditional_array_execution.rs:5:19 + --> $DIR/conditional_array_execution.rs:7:19 | LL | const FOO: u32 = [X - Y, Y - X][(X < Y) as usize]; | ------------------^^^^^--------------------------- @@ -7,13 +7,13 @@ LL | const FOO: u32 = [X - Y, Y - X][(X < Y) as usize]; | attempt to subtract with overflow | note: lint level defined here - --> $DIR/conditional_array_execution.rs:1:9 + --> $DIR/conditional_array_execution.rs:3:9 | LL | #![warn(const_err)] | ^^^^^^^^^ error[E0080]: evaluation of constant expression failed - --> $DIR/conditional_array_execution.rs:9:20 + --> $DIR/conditional_array_execution.rs:11:20 | LL | println!("{}", FOO); | ^^^ referenced constant has errors diff --git a/src/test/ui/consts/const-eval/const_fn_ptr_fail2.rs b/src/test/ui/consts/const-eval/const_fn_ptr_fail2.rs index b300119509c..a5f04d088b6 100644 --- a/src/test/ui/consts/const-eval/const_fn_ptr_fail2.rs +++ b/src/test/ui/consts/const-eval/const_fn_ptr_fail2.rs @@ -1,4 +1,6 @@ +// build-fail // compile-flags: -Zunleash-the-miri-inside-of-you + #![feature(const_fn)] #![allow(const_err)] diff --git a/src/test/ui/consts/const-eval/const_fn_ptr_fail2.stderr b/src/test/ui/consts/const-eval/const_fn_ptr_fail2.stderr index 9d74d3b0bf2..19f37fa0079 100644 --- a/src/test/ui/consts/const-eval/const_fn_ptr_fail2.stderr +++ b/src/test/ui/consts/const-eval/const_fn_ptr_fail2.stderr @@ -1,11 +1,11 @@ warning: skipping const checks - --> $DIR/const_fn_ptr_fail2.rs:9:5 + --> $DIR/const_fn_ptr_fail2.rs:11:5 | LL | x(y) | ^^^^ error[E0080]: evaluation of constant expression failed - --> $DIR/const_fn_ptr_fail2.rs:16:5 + --> $DIR/const_fn_ptr_fail2.rs:18:5 | LL | assert_eq!(Y, 4); | ^^^^^^^^^^^-^^^^^ @@ -15,7 +15,7 @@ LL | assert_eq!(Y, 4); = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) error[E0080]: evaluation of constant expression failed - --> $DIR/const_fn_ptr_fail2.rs:18:5 + --> $DIR/const_fn_ptr_fail2.rs:20:5 | LL | assert_eq!(Z, 4); | ^^^^^^^^^^^-^^^^^ 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 f6ab0bd7dbe..2a983e42683 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,3 +1,5 @@ +// build-fail + // Regression test for #66975 #![warn(const_err)] #![feature(never_type)] 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 24830f7344c..8431ebb95af 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:8:61 + --> $DIR/index-out-of-bounds-never-type.rs:9:61 | LL | const VOID: ! = { let x = 0 * std::mem::size_of::(); [][x] }; | --------------------------------------------------------^^^^^--- @@ -7,16 +7,15 @@ LL | const VOID: ! = { let x = 0 * std::mem::size_of::(); [][x] }; | index out of bounds: the len is 0 but the index is 0 | note: lint level defined here - --> $DIR/index-out-of-bounds-never-type.rs:2:9 + --> $DIR/index-out-of-bounds-never-type.rs:4:9 | LL | #![warn(const_err)] | ^^^^^^^^^ error: erroneous constant encountered - --> $DIR/index-out-of-bounds-never-type.rs:13:13 + --> $DIR/index-out-of-bounds-never-type.rs:14:13 | LL | let _ = PrintName::::VOID; | ^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error - diff --git a/src/test/ui/consts/const-eval/index_out_of_bounds_propagated.rs b/src/test/ui/consts/const-eval/index_out_of_bounds_propagated.rs index 4b487c09a11..6d6bb94d4df 100644 --- a/src/test/ui/consts/const-eval/index_out_of_bounds_propagated.rs +++ b/src/test/ui/consts/const-eval/index_out_of_bounds_propagated.rs @@ -1,3 +1,5 @@ +// build-fail + fn main() { let array = [std::env::args().len()]; array[1]; //~ ERROR index out of bounds diff --git a/src/test/ui/consts/const-eval/index_out_of_bounds_propagated.stderr b/src/test/ui/consts/const-eval/index_out_of_bounds_propagated.stderr index f330f9caaa2..9519ccd3c24 100644 --- a/src/test/ui/consts/const-eval/index_out_of_bounds_propagated.stderr +++ b/src/test/ui/consts/const-eval/index_out_of_bounds_propagated.stderr @@ -1,5 +1,5 @@ error: index out of bounds: the len is 1 but the index is 1 - --> $DIR/index_out_of_bounds_propagated.rs:3:5 + --> $DIR/index_out_of_bounds_propagated.rs:5:5 | LL | array[1]; | ^^^^^^^^ diff --git a/src/test/ui/consts/const-eval/issue-43197.rs b/src/test/ui/consts/const-eval/issue-43197.rs index 440862090bd..849c81ad449 100644 --- a/src/test/ui/consts/const-eval/issue-43197.rs +++ b/src/test/ui/consts/const-eval/issue-43197.rs @@ -1,3 +1,5 @@ +// build-fail + #![warn(const_err)] const fn foo(x: u32) -> u32 { diff --git a/src/test/ui/consts/const-eval/issue-43197.stderr b/src/test/ui/consts/const-eval/issue-43197.stderr index d971d825f27..a1b3a05ed41 100644 --- a/src/test/ui/consts/const-eval/issue-43197.stderr +++ b/src/test/ui/consts/const-eval/issue-43197.stderr @@ -1,5 +1,5 @@ warning: any use of this value will cause an error - --> $DIR/issue-43197.rs:8:20 + --> $DIR/issue-43197.rs:10:20 | LL | const X: u32 = 0-1; | ---------------^^^- @@ -7,13 +7,13 @@ LL | const X: u32 = 0-1; | attempt to subtract with overflow | note: lint level defined here - --> $DIR/issue-43197.rs:1:9 + --> $DIR/issue-43197.rs:3:9 | LL | #![warn(const_err)] | ^^^^^^^^^ warning: any use of this value will cause an error - --> $DIR/issue-43197.rs:10:24 + --> $DIR/issue-43197.rs:12:24 | LL | const Y: u32 = foo(0-1); | -------------------^^^-- @@ -21,13 +21,13 @@ LL | const Y: u32 = foo(0-1); | attempt to subtract with overflow error[E0080]: evaluation of constant expression failed - --> $DIR/issue-43197.rs:12:23 + --> $DIR/issue-43197.rs:14:23 | LL | println!("{} {}", X, Y); | ^ referenced constant has errors error[E0080]: evaluation of constant expression failed - --> $DIR/issue-43197.rs:12:26 + --> $DIR/issue-43197.rs:14:26 | LL | println!("{} {}", X, Y); | ^ referenced constant has errors diff --git a/src/test/ui/consts/const-eval/issue-44578.rs b/src/test/ui/consts/const-eval/issue-44578.rs index 4d93130f2af..7da9256bb39 100644 --- a/src/test/ui/consts/const-eval/issue-44578.rs +++ b/src/test/ui/consts/const-eval/issue-44578.rs @@ -1,3 +1,5 @@ +// build-fail + #![allow(const_err)] trait Foo { diff --git a/src/test/ui/consts/const-eval/issue-44578.stderr b/src/test/ui/consts/const-eval/issue-44578.stderr index 3fadeac1d5c..f4323713e68 100644 --- a/src/test/ui/consts/const-eval/issue-44578.stderr +++ b/src/test/ui/consts/const-eval/issue-44578.stderr @@ -1,5 +1,5 @@ error[E0080]: evaluation of constant expression failed - --> $DIR/issue-44578.rs:25:20 + --> $DIR/issue-44578.rs:27:20 | LL | println!("{}", as Foo>::AMT); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors diff --git a/src/test/ui/consts/const-eval/issue-50814-2.rs b/src/test/ui/consts/const-eval/issue-50814-2.rs index b13c19c660e..8f5c8f097a2 100644 --- a/src/test/ui/consts/const-eval/issue-50814-2.rs +++ b/src/test/ui/consts/const-eval/issue-50814-2.rs @@ -1,3 +1,5 @@ +// build-fail + trait C { const BOO: usize; } diff --git a/src/test/ui/consts/const-eval/issue-50814-2.stderr b/src/test/ui/consts/const-eval/issue-50814-2.stderr index d68f72d36e2..e04bf03a20c 100644 --- a/src/test/ui/consts/const-eval/issue-50814-2.stderr +++ b/src/test/ui/consts/const-eval/issue-50814-2.stderr @@ -1,5 +1,5 @@ error: any use of this value will cause an error - --> $DIR/issue-50814-2.rs:12:24 + --> $DIR/issue-50814-2.rs:14:24 | LL | const BAR: usize = [5, 6, 7][T::BOO]; | -------------------^^^^^^^^^^^^^^^^^- @@ -9,7 +9,7 @@ LL | const BAR: usize = [5, 6, 7][T::BOO]; = note: `#[deny(const_err)]` on by default error[E0080]: evaluation of constant expression failed - --> $DIR/issue-50814-2.rs:16:5 + --> $DIR/issue-50814-2.rs:18:5 | LL | & as Foo>::BAR | ^--------------------- diff --git a/src/test/ui/consts/const-eval/issue-50814.rs b/src/test/ui/consts/const-eval/issue-50814.rs index b85cecda16e..e589126a942 100644 --- a/src/test/ui/consts/const-eval/issue-50814.rs +++ b/src/test/ui/consts/const-eval/issue-50814.rs @@ -1,3 +1,5 @@ +// build-fail + trait Unsigned { const MAX: u8; } diff --git a/src/test/ui/consts/const-eval/issue-50814.stderr b/src/test/ui/consts/const-eval/issue-50814.stderr index 707dfee7cd5..f8b017e4b53 100644 --- a/src/test/ui/consts/const-eval/issue-50814.stderr +++ b/src/test/ui/consts/const-eval/issue-50814.stderr @@ -1,5 +1,5 @@ error: any use of this value will cause an error - --> $DIR/issue-50814.rs:13:21 + --> $DIR/issue-50814.rs:15:21 | LL | const MAX: u8 = A::MAX + B::MAX; | ----------------^^^^^^^^^^^^^^^- @@ -9,7 +9,7 @@ LL | const MAX: u8 = A::MAX + B::MAX; = note: `#[deny(const_err)]` on by default error[E0080]: evaluation of constant expression failed - --> $DIR/issue-50814.rs:17:5 + --> $DIR/issue-50814.rs:19:5 | LL | &Sum::::MAX | ^----------------- 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 a7cbdb40ef1..21ee64fa6d9 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,3 +1,5 @@ +// build-fail + // Regression test for #66975 #![warn(const_err)] #![feature(const_panic)] 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 e15952c20e4..df3c80de2ec 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,20 +1,20 @@ warning: any use of this value will cause an error - --> $DIR/panic-assoc-never-type.rs:9:21 + --> $DIR/panic-assoc-never-type.rs:10:21 | LL | const VOID: ! = panic!(); | ----------------^^^^^^^^- | | - | the evaluated program panicked at 'explicit panic', $DIR/panic-assoc-never-type.rs:9:21 + | the evaluated program panicked at 'explicit panic', $DIR/panic-assoc-never-type.rs:10:21 | note: lint level defined here - --> $DIR/panic-assoc-never-type.rs:2:9 + --> $DIR/panic-assoc-never-type.rs:4:9 | 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:14:13 + --> $DIR/panic-assoc-never-type.rs:15: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 b1a7d8ae676..3b28b2fdd24 100644 --- a/src/test/ui/consts/const-eval/panic-never-type.rs +++ b/src/test/ui/consts/const-eval/panic-never-type.rs @@ -1,3 +1,5 @@ +// build-fail + // Regression test for #66975 #![warn(const_err)] #![feature(const_panic)] 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 9e91fdf4514..9670d7eb652 100644 --- a/src/test/ui/consts/const-eval/panic-never-type.stderr +++ b/src/test/ui/consts/const-eval/panic-never-type.stderr @@ -1,20 +1,20 @@ warning: any use of this value will cause an error - --> $DIR/panic-never-type.rs:6:17 + --> $DIR/panic-never-type.rs:7:17 | LL | const VOID: ! = panic!(); | ----------------^^^^^^^^- | | - | the evaluated program panicked at 'explicit panic', $DIR/panic-never-type.rs:6:17 + | the evaluated program panicked at 'explicit panic', $DIR/panic-never-type.rs:7:17 | note: lint level defined here - --> $DIR/panic-never-type.rs:2:9 + --> $DIR/panic-never-type.rs:4:9 | 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:10:13 + --> $DIR/panic-never-type.rs:11:13 | LL | let _ = VOID; | ^^^^ referenced constant has errors diff --git a/src/test/ui/consts/const-eval/promoted_errors.rs b/src/test/ui/consts/const-eval/promoted_errors.rs index dfa6863082c..2eed8ca7d32 100644 --- a/src/test/ui/consts/const-eval/promoted_errors.rs +++ b/src/test/ui/consts/const-eval/promoted_errors.rs @@ -1,3 +1,4 @@ +// build-fail // compile-flags: -O #![deny(const_err)] diff --git a/src/test/ui/consts/const-eval/promoted_errors.stderr b/src/test/ui/consts/const-eval/promoted_errors.stderr index 848a880ba49..8f17ef05f23 100644 --- a/src/test/ui/consts/const-eval/promoted_errors.stderr +++ b/src/test/ui/consts/const-eval/promoted_errors.stderr @@ -1,47 +1,47 @@ error: this expression will panic at runtime - --> $DIR/promoted_errors.rs:7:14 + --> $DIR/promoted_errors.rs:8:14 | LL | let _x = 0u32 - 1; | ^^^^^^^^ attempt to subtract with overflow | note: lint level defined here - --> $DIR/promoted_errors.rs:3:9 + --> $DIR/promoted_errors.rs:4:9 | LL | #![deny(const_err)] | ^^^^^^^^^ error: attempt to divide by zero - --> $DIR/promoted_errors.rs:9:20 + --> $DIR/promoted_errors.rs:10:20 | LL | println!("{}", 1/(1-1)); | ^^^^^^^ error: reaching this expression at runtime will panic or abort - --> $DIR/promoted_errors.rs:9:20 + --> $DIR/promoted_errors.rs:10:20 | LL | println!("{}", 1/(1-1)); | ^^^^^^^ dividing by zero error: attempt to divide by zero - --> $DIR/promoted_errors.rs:12:14 + --> $DIR/promoted_errors.rs:13:14 | LL | let _x = 1/(1-1); | ^^^^^^^ error: attempt to divide by zero - --> $DIR/promoted_errors.rs:14:20 + --> $DIR/promoted_errors.rs:15:20 | LL | println!("{}", 1/(false as u32)); | ^^^^^^^^^^^^^^^^ error: reaching this expression at runtime will panic or abort - --> $DIR/promoted_errors.rs:14:20 + --> $DIR/promoted_errors.rs:15:20 | LL | println!("{}", 1/(false as u32)); | ^^^^^^^^^^^^^^^^ dividing by zero error: attempt to divide by zero - --> $DIR/promoted_errors.rs:17:14 + --> $DIR/promoted_errors.rs:18:14 | LL | let _x = 1/(false as u32); | ^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/consts/const-eval/promoted_errors2.rs b/src/test/ui/consts/const-eval/promoted_errors2.rs index 58b17940912..ae680b4f107 100644 --- a/src/test/ui/consts/const-eval/promoted_errors2.rs +++ b/src/test/ui/consts/const-eval/promoted_errors2.rs @@ -1,3 +1,4 @@ +// build-fail // compile-flags: -C overflow-checks=on -O #![deny(const_err)] diff --git a/src/test/ui/consts/const-eval/promoted_errors2.stderr b/src/test/ui/consts/const-eval/promoted_errors2.stderr index 6f4b1c045f4..60a3cba6e1f 100644 --- a/src/test/ui/consts/const-eval/promoted_errors2.stderr +++ b/src/test/ui/consts/const-eval/promoted_errors2.stderr @@ -1,53 +1,53 @@ error: attempt to subtract with overflow - --> $DIR/promoted_errors2.rs:6:20 + --> $DIR/promoted_errors2.rs:7:20 | LL | println!("{}", 0u32 - 1); | ^^^^^^^^ | note: lint level defined here - --> $DIR/promoted_errors2.rs:3:9 + --> $DIR/promoted_errors2.rs:4:9 | LL | #![deny(const_err)] | ^^^^^^^^^ error: attempt to subtract with overflow - --> $DIR/promoted_errors2.rs:8:14 + --> $DIR/promoted_errors2.rs:9:14 | LL | let _x = 0u32 - 1; | ^^^^^^^^ error: attempt to divide by zero - --> $DIR/promoted_errors2.rs:10:20 + --> $DIR/promoted_errors2.rs:11:20 | LL | println!("{}", 1/(1-1)); | ^^^^^^^ error: reaching this expression at runtime will panic or abort - --> $DIR/promoted_errors2.rs:10:20 + --> $DIR/promoted_errors2.rs:11:20 | LL | println!("{}", 1/(1-1)); | ^^^^^^^ dividing by zero error: attempt to divide by zero - --> $DIR/promoted_errors2.rs:13:14 + --> $DIR/promoted_errors2.rs:14:14 | LL | let _x = 1/(1-1); | ^^^^^^^ error: attempt to divide by zero - --> $DIR/promoted_errors2.rs:15:20 + --> $DIR/promoted_errors2.rs:16:20 | LL | println!("{}", 1/(false as u32)); | ^^^^^^^^^^^^^^^^ error: reaching this expression at runtime will panic or abort - --> $DIR/promoted_errors2.rs:15:20 + --> $DIR/promoted_errors2.rs:16:20 | LL | println!("{}", 1/(false as u32)); | ^^^^^^^^^^^^^^^^ dividing by zero error: attempt to divide by zero - --> $DIR/promoted_errors2.rs:18:14 + --> $DIR/promoted_errors2.rs:19:14 | LL | let _x = 1/(false as u32); | ^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/consts/const-prop-ice.rs b/src/test/ui/consts/const-prop-ice.rs index 13309f978b6..8682d2ee901 100644 --- a/src/test/ui/consts/const-prop-ice.rs +++ b/src/test/ui/consts/const-prop-ice.rs @@ -1,3 +1,5 @@ +// build-fail + fn main() { [0; 3][3u64 as usize]; //~ ERROR the len is 3 but the index is 3 } diff --git a/src/test/ui/consts/const-prop-ice.stderr b/src/test/ui/consts/const-prop-ice.stderr index 4b3880198bf..65502a4ff71 100644 --- a/src/test/ui/consts/const-prop-ice.stderr +++ b/src/test/ui/consts/const-prop-ice.stderr @@ -1,5 +1,5 @@ error: index out of bounds: the len is 3 but the index is 3 - --> $DIR/const-prop-ice.rs:2:5 + --> $DIR/const-prop-ice.rs:4:5 | LL | [0; 3][3u64 as usize]; | ^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/consts/const-prop-ice2.rs b/src/test/ui/consts/const-prop-ice2.rs index e5fd79f1167..6a73483026f 100644 --- a/src/test/ui/consts/const-prop-ice2.rs +++ b/src/test/ui/consts/const-prop-ice2.rs @@ -1,3 +1,5 @@ +// build-fail + fn main() { enum Enum { One=1 } let xs=[0;1 as usize]; diff --git a/src/test/ui/consts/const-prop-ice2.stderr b/src/test/ui/consts/const-prop-ice2.stderr index dc17876eae4..cbb8fde80f9 100644 --- a/src/test/ui/consts/const-prop-ice2.stderr +++ b/src/test/ui/consts/const-prop-ice2.stderr @@ -1,5 +1,5 @@ error: index out of bounds: the len is 1 but the index is 1 - --> $DIR/const-prop-ice2.rs:4:20 + --> $DIR/const-prop-ice2.rs:6:20 | LL | println!("{}", xs[Enum::One as usize]); | ^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/consts/miri_unleashed/assoc_const.rs b/src/test/ui/consts/miri_unleashed/assoc_const.rs index b8959667cc2..cfbcc959d3b 100644 --- a/src/test/ui/consts/miri_unleashed/assoc_const.rs +++ b/src/test/ui/consts/miri_unleashed/assoc_const.rs @@ -1,4 +1,6 @@ +// build-fail // compile-flags: -Zunleash-the-miri-inside-of-you + #![allow(const_err)] // a test demonstrating why we do need to run static const qualification on associated constants diff --git a/src/test/ui/consts/miri_unleashed/assoc_const.stderr b/src/test/ui/consts/miri_unleashed/assoc_const.stderr index 6a6cb343f17..1ccf2b196fd 100644 --- a/src/test/ui/consts/miri_unleashed/assoc_const.stderr +++ b/src/test/ui/consts/miri_unleashed/assoc_const.stderr @@ -1,11 +1,11 @@ warning: skipping const checks - --> $DIR/assoc_const.rs:12:20 + --> $DIR/assoc_const.rs:14:20 | LL | const F: u32 = (U::X, 42).1; | ^^^^^^^^^^ error[E0080]: erroneous constant used - --> $DIR/assoc_const.rs:29:13 + --> $DIR/assoc_const.rs:31:13 | LL | let y = , String>>::F; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors diff --git a/src/test/ui/consts/miri_unleashed/assoc_const_2.rs b/src/test/ui/consts/miri_unleashed/assoc_const_2.rs index c87b6389848..30dd2a51585 100644 --- a/src/test/ui/consts/miri_unleashed/assoc_const_2.rs +++ b/src/test/ui/consts/miri_unleashed/assoc_const_2.rs @@ -1,3 +1,5 @@ +// build-fail + #![allow(const_err)] // a test demonstrating that const qualification cannot prevent monomorphization time errors diff --git a/src/test/ui/consts/miri_unleashed/assoc_const_2.stderr b/src/test/ui/consts/miri_unleashed/assoc_const_2.stderr index dbfe1d93aa4..e15717979c5 100644 --- a/src/test/ui/consts/miri_unleashed/assoc_const_2.stderr +++ b/src/test/ui/consts/miri_unleashed/assoc_const_2.stderr @@ -1,5 +1,5 @@ error[E0080]: erroneous constant used - --> $DIR/assoc_const_2.rs:27:13 + --> $DIR/assoc_const_2.rs:29:13 | LL | let y = >::F; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors diff --git a/src/test/ui/consts/miri_unleashed/non_const_fn.rs b/src/test/ui/consts/miri_unleashed/non_const_fn.rs index e1ac4306575..32a713ebaa4 100644 --- a/src/test/ui/consts/miri_unleashed/non_const_fn.rs +++ b/src/test/ui/consts/miri_unleashed/non_const_fn.rs @@ -1,4 +1,6 @@ +// build-fail // compile-flags: -Zunleash-the-miri-inside-of-you + #![warn(const_err)] // A test demonstrating that we prevent calling non-const fn during CTFE. diff --git a/src/test/ui/consts/miri_unleashed/non_const_fn.stderr b/src/test/ui/consts/miri_unleashed/non_const_fn.stderr index 7a574b34304..75f532a81bd 100644 --- a/src/test/ui/consts/miri_unleashed/non_const_fn.stderr +++ b/src/test/ui/consts/miri_unleashed/non_const_fn.stderr @@ -1,11 +1,11 @@ warning: skipping const checks - --> $DIR/non_const_fn.rs:8:15 + --> $DIR/non_const_fn.rs:10:15 | LL | const C: () = foo(); | ^^^^^ warning: any use of this value will cause an error - --> $DIR/non_const_fn.rs:8:15 + --> $DIR/non_const_fn.rs:10:15 | LL | const C: () = foo(); | --------------^^^^^- @@ -13,13 +13,13 @@ LL | const C: () = foo(); | calling non-const function `foo` | note: lint level defined here - --> $DIR/non_const_fn.rs:2:9 + --> $DIR/non_const_fn.rs:4:9 | LL | #![warn(const_err)] | ^^^^^^^^^ error[E0080]: evaluation of constant expression failed - --> $DIR/non_const_fn.rs:12:22 + --> $DIR/non_const_fn.rs:14:22 | LL | println!("{:?}", C); | ^ referenced constant has errors diff --git a/src/test/ui/consts/uninhabited-const-issue-61744.rs b/src/test/ui/consts/uninhabited-const-issue-61744.rs index e10b38a614a..945017b4937 100644 --- a/src/test/ui/consts/uninhabited-const-issue-61744.rs +++ b/src/test/ui/consts/uninhabited-const-issue-61744.rs @@ -1,4 +1,4 @@ -// compile-fail +// build-fail pub const unsafe fn fake_type() -> T { hint_unreachable() diff --git a/src/test/ui/duplicate/dupe-symbols-1.rs b/src/test/ui/duplicate/dupe-symbols-1.rs index f943c7b1110..28e329b56ca 100644 --- a/src/test/ui/duplicate/dupe-symbols-1.rs +++ b/src/test/ui/duplicate/dupe-symbols-1.rs @@ -1,3 +1,5 @@ +// build-fail + // #![crate_type="rlib"] #![allow(warnings)] diff --git a/src/test/ui/duplicate/dupe-symbols-1.stderr b/src/test/ui/duplicate/dupe-symbols-1.stderr index c46ac0c6ed4..cca8b4d25da 100644 --- a/src/test/ui/duplicate/dupe-symbols-1.stderr +++ b/src/test/ui/duplicate/dupe-symbols-1.stderr @@ -1,5 +1,5 @@ error: symbol `fail` is already defined - --> $DIR/dupe-symbols-1.rs:10:1 + --> $DIR/dupe-symbols-1.rs:12:1 | LL | / pub fn b() { LL | | diff --git a/src/test/ui/duplicate/dupe-symbols-2.rs b/src/test/ui/duplicate/dupe-symbols-2.rs index 9257f97fb93..d9edd77a199 100644 --- a/src/test/ui/duplicate/dupe-symbols-2.rs +++ b/src/test/ui/duplicate/dupe-symbols-2.rs @@ -1,3 +1,5 @@ +// build-fail + // #![crate_type="rlib"] #![allow(warnings)] diff --git a/src/test/ui/duplicate/dupe-symbols-2.stderr b/src/test/ui/duplicate/dupe-symbols-2.stderr index 821bdd03392..017aade3129 100644 --- a/src/test/ui/duplicate/dupe-symbols-2.stderr +++ b/src/test/ui/duplicate/dupe-symbols-2.stderr @@ -1,5 +1,5 @@ error: symbol `fail` is already defined - --> $DIR/dupe-symbols-2.rs:13:5 + --> $DIR/dupe-symbols-2.rs:15:5 | LL | / pub extern fn fail() { LL | | diff --git a/src/test/ui/duplicate/dupe-symbols-3.rs b/src/test/ui/duplicate/dupe-symbols-3.rs index 03b3a0ab207..1af2fe98e50 100644 --- a/src/test/ui/duplicate/dupe-symbols-3.rs +++ b/src/test/ui/duplicate/dupe-symbols-3.rs @@ -1,3 +1,5 @@ +// build-fail + // #![crate_type="rlib"] #![allow(warnings)] diff --git a/src/test/ui/duplicate/dupe-symbols-3.stderr b/src/test/ui/duplicate/dupe-symbols-3.stderr index f30c88e4760..2e2ac3a98b8 100644 --- a/src/test/ui/duplicate/dupe-symbols-3.stderr +++ b/src/test/ui/duplicate/dupe-symbols-3.stderr @@ -1,5 +1,5 @@ error: symbol `fail` is already defined - --> $DIR/dupe-symbols-3.rs:10:1 + --> $DIR/dupe-symbols-3.rs:12:1 | LL | / pub fn fail() { LL | | diff --git a/src/test/ui/duplicate/dupe-symbols-4.rs b/src/test/ui/duplicate/dupe-symbols-4.rs index 8fbf1151f7c..de6610c3e79 100644 --- a/src/test/ui/duplicate/dupe-symbols-4.rs +++ b/src/test/ui/duplicate/dupe-symbols-4.rs @@ -1,3 +1,5 @@ +// build-fail + // // error-pattern: symbol `fail` is already defined #![crate_type="rlib"] diff --git a/src/test/ui/duplicate/dupe-symbols-4.stderr b/src/test/ui/duplicate/dupe-symbols-4.stderr index 84d57766c35..10b93891b66 100644 --- a/src/test/ui/duplicate/dupe-symbols-4.stderr +++ b/src/test/ui/duplicate/dupe-symbols-4.stderr @@ -1,5 +1,5 @@ error: symbol `fail` is already defined - --> $DIR/dupe-symbols-4.rs:21:5 + --> $DIR/dupe-symbols-4.rs:23:5 | LL | fn fail(self) {} | ^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/duplicate/dupe-symbols-5.rs b/src/test/ui/duplicate/dupe-symbols-5.rs index 4a96a685821..ea801cef64f 100644 --- a/src/test/ui/duplicate/dupe-symbols-5.rs +++ b/src/test/ui/duplicate/dupe-symbols-5.rs @@ -1,3 +1,5 @@ +// build-fail + // #![crate_type="rlib"] #![allow(warnings)] diff --git a/src/test/ui/duplicate/dupe-symbols-5.stderr b/src/test/ui/duplicate/dupe-symbols-5.stderr index cee72660e4f..ebeb19f94f6 100644 --- a/src/test/ui/duplicate/dupe-symbols-5.stderr +++ b/src/test/ui/duplicate/dupe-symbols-5.stderr @@ -1,5 +1,5 @@ error: symbol `fail` is already defined - --> $DIR/dupe-symbols-5.rs:9:1 + --> $DIR/dupe-symbols-5.rs:11:1 | LL | / pub fn b() { LL | | diff --git a/src/test/ui/duplicate/dupe-symbols-6.rs b/src/test/ui/duplicate/dupe-symbols-6.rs index 5a1b917f179..018f4bb7f07 100644 --- a/src/test/ui/duplicate/dupe-symbols-6.rs +++ b/src/test/ui/duplicate/dupe-symbols-6.rs @@ -1,3 +1,5 @@ +// build-fail + #![crate_type="rlib"] #![allow(warnings)] diff --git a/src/test/ui/duplicate/dupe-symbols-6.stderr b/src/test/ui/duplicate/dupe-symbols-6.stderr index 69781ee3e0d..8d5b7fb35bf 100644 --- a/src/test/ui/duplicate/dupe-symbols-6.stderr +++ b/src/test/ui/duplicate/dupe-symbols-6.stderr @@ -1,5 +1,5 @@ error: symbol `fail` is already defined - --> $DIR/dupe-symbols-6.rs:8:1 + --> $DIR/dupe-symbols-6.rs:10:1 | LL | static HELLO_TWICE: u16 = 0; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/duplicate/dupe-symbols-7.rs b/src/test/ui/duplicate/dupe-symbols-7.rs index b838aaa102e..89a32c61620 100644 --- a/src/test/ui/duplicate/dupe-symbols-7.rs +++ b/src/test/ui/duplicate/dupe-symbols-7.rs @@ -1,3 +1,5 @@ +// build-fail + // // error-pattern: entry symbol `main` defined multiple times diff --git a/src/test/ui/duplicate/dupe-symbols-7.stderr b/src/test/ui/duplicate/dupe-symbols-7.stderr index d2cb4e0970e..608ae27110a 100644 --- a/src/test/ui/duplicate/dupe-symbols-7.stderr +++ b/src/test/ui/duplicate/dupe-symbols-7.stderr @@ -1,5 +1,5 @@ error: entry symbol `main` defined multiple times - --> $DIR/dupe-symbols-7.rs:10:1 + --> $DIR/dupe-symbols-7.rs:12:1 | LL | fn main(){} | ^^^^^^^^^^^ diff --git a/src/test/ui/error-codes/E0511.rs b/src/test/ui/error-codes/E0511.rs index 3590f12e5f9..a52f81a6c5d 100644 --- a/src/test/ui/error-codes/E0511.rs +++ b/src/test/ui/error-codes/E0511.rs @@ -1,3 +1,5 @@ +// build-fail + #![feature(platform_intrinsics)] extern "platform-intrinsic" { diff --git a/src/test/ui/error-codes/E0511.stderr b/src/test/ui/error-codes/E0511.stderr index 1362a3d1f25..d797b10d5a6 100644 --- a/src/test/ui/error-codes/E0511.stderr +++ b/src/test/ui/error-codes/E0511.stderr @@ -1,5 +1,5 @@ error[E0511]: invalid monomorphization of `simd_add` intrinsic: expected SIMD input type, found non-SIMD `i32` - --> $DIR/E0511.rs:8:14 + --> $DIR/E0511.rs:10:14 | LL | unsafe { simd_add(0, 1); } | ^^^^^^^^^^^^^^ diff --git a/src/test/ui/huge-array-simple-64.rs b/src/test/ui/huge-array-simple-64.rs index f72d69ee747..d4c93301283 100644 --- a/src/test/ui/huge-array-simple-64.rs +++ b/src/test/ui/huge-array-simple-64.rs @@ -1,3 +1,4 @@ +// build-fail // ignore-32bit // FIXME https://github.com/rust-lang/rust/issues/59774 diff --git a/src/test/ui/huge-array-simple-64.stderr b/src/test/ui/huge-array-simple-64.stderr index 6ed89269f0f..791baa84687 100644 --- a/src/test/ui/huge-array-simple-64.stderr +++ b/src/test/ui/huge-array-simple-64.stderr @@ -1,5 +1,5 @@ error: the type `[u8; 2305843011361177600]` is too big for the current architecture - --> $DIR/huge-array-simple-64.rs:9:9 + --> $DIR/huge-array-simple-64.rs:10:9 | LL | let _fat: [u8; (1<<61)+(1<<31)] = | ^^^^ diff --git a/src/test/ui/huge-array.rs b/src/test/ui/huge-array.rs index 1ecf012e04b..846380586a0 100644 --- a/src/test/ui/huge-array.rs +++ b/src/test/ui/huge-array.rs @@ -1,4 +1,6 @@ // FIXME https://github.com/rust-lang/rust/issues/59774 + +// build-fail // normalize-stderr-test "thread.*panicked.*Metadata module not compiled.*\n" -> "" // normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> "" diff --git a/src/test/ui/huge-array.stderr b/src/test/ui/huge-array.stderr index 823d974f429..23d9e87ae00 100644 --- a/src/test/ui/huge-array.stderr +++ b/src/test/ui/huge-array.stderr @@ -1,5 +1,5 @@ error: the type `[[u8; 1518599999]; 1518600000]` is too big for the current architecture - --> $DIR/huge-array.rs:6:9 + --> $DIR/huge-array.rs:8:9 | LL | let s: [T; 1518600000] = [t; 1518600000]; | ^ diff --git a/src/test/ui/huge-enum.rs b/src/test/ui/huge-enum.rs index 98d0ba6e15c..8a713c3a26e 100644 --- a/src/test/ui/huge-enum.rs +++ b/src/test/ui/huge-enum.rs @@ -1,3 +1,4 @@ +// build-fail // normalize-stderr-test "std::option::Option<\[u32; \d+\]>" -> "TYPE" // normalize-stderr-test "\[u32; \d+\]" -> "TYPE" diff --git a/src/test/ui/huge-enum.stderr b/src/test/ui/huge-enum.stderr index 1f16c81a8f4..8398c511b9f 100644 --- a/src/test/ui/huge-enum.stderr +++ b/src/test/ui/huge-enum.stderr @@ -1,5 +1,5 @@ error: the type `TYPE` is too big for the current architecture - --> $DIR/huge-enum.rs:15:9 + --> $DIR/huge-enum.rs:16:9 | LL | let big: BIG = None; | ^^^ diff --git a/src/test/ui/huge-struct.rs b/src/test/ui/huge-struct.rs index e50ca5f54d1..71169a11047 100644 --- a/src/test/ui/huge-struct.rs +++ b/src/test/ui/huge-struct.rs @@ -1,3 +1,4 @@ +// build-fail // normalize-stderr-test "S32" -> "SXX" // normalize-stderr-test "S1M" -> "SXX" // error-pattern: too big for the current diff --git a/src/test/ui/huge-struct.stderr b/src/test/ui/huge-struct.stderr index 5c2140df481..72e32a8593b 100644 --- a/src/test/ui/huge-struct.stderr +++ b/src/test/ui/huge-struct.stderr @@ -1,5 +1,5 @@ error: the type `SXX>>` is too big for the current architecture - --> $DIR/huge-struct.rs:49:9 + --> $DIR/huge-struct.rs:50:9 | LL | let fat: Option>>> = None; | ^^^ diff --git a/src/test/ui/infinite/infinite-instantiation.rs b/src/test/ui/infinite/infinite-instantiation.rs index 4220c8837d2..6f53680f7c8 100644 --- a/src/test/ui/infinite/infinite-instantiation.rs +++ b/src/test/ui/infinite/infinite-instantiation.rs @@ -4,6 +4,8 @@ // so for now just live with it. // This test case was originally for issue #2258. +// build-fail + trait ToOpt: Sized { fn to_option(&self) -> Option; } diff --git a/src/test/ui/infinite/infinite-instantiation.stderr b/src/test/ui/infinite/infinite-instantiation.stderr index d75dc0403a2..ae81c680a7b 100644 --- a/src/test/ui/infinite/infinite-instantiation.stderr +++ b/src/test/ui/infinite/infinite-instantiation.stderr @@ -1,5 +1,5 @@ error: reached the recursion limit while instantiating `function::>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` - --> $DIR/infinite-instantiation.rs:23:1 + --> $DIR/infinite-instantiation.rs:25:1 | LL | / fn function(counter: usize, t: T) { LL | | diff --git a/src/test/ui/inline-asm-bad-constraint.rs b/src/test/ui/inline-asm-bad-constraint.rs index cf72afff50b..04fd5760cf8 100644 --- a/src/test/ui/inline-asm-bad-constraint.rs +++ b/src/test/ui/inline-asm-bad-constraint.rs @@ -1,5 +1,6 @@ // Test that the compiler will catch invalid inline assembly constraints. +// build-fail // ignore-emscripten #![feature(asm)] diff --git a/src/test/ui/inline-asm-bad-constraint.stderr b/src/test/ui/inline-asm-bad-constraint.stderr index 59066e5e7fc..f38bfb2af1d 100644 --- a/src/test/ui/inline-asm-bad-constraint.stderr +++ b/src/test/ui/inline-asm-bad-constraint.stderr @@ -1,17 +1,17 @@ error[E0668]: malformed inline assembly - --> $DIR/inline-asm-bad-constraint.rs:21:9 + --> $DIR/inline-asm-bad-constraint.rs:22:9 | LL | asm!("" :"={rax"(rax)) | ^^^^^^^^^^^^^^^^^^^^^^ error[E0668]: malformed inline assembly - --> $DIR/inline-asm-bad-constraint.rs:29:9 + --> $DIR/inline-asm-bad-constraint.rs:30:9 | LL | asm!("callq $0" : : "0"(foo)) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0668]: malformed inline assembly - --> $DIR/inline-asm-bad-constraint.rs:36:9 + --> $DIR/inline-asm-bad-constraint.rs:37:9 | LL | asm!("addb $1, $0" : "={rax}"((0i32, rax))); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/inline-asm-bad-operand.rs b/src/test/ui/inline-asm-bad-operand.rs index 4cfe100d85b..f4e9922164f 100644 --- a/src/test/ui/inline-asm-bad-operand.rs +++ b/src/test/ui/inline-asm-bad-operand.rs @@ -1,6 +1,7 @@ // Test that the compiler will catch passing invalid values to inline assembly // operands. +// build-fail // ignore-emscripten #![feature(asm)] diff --git a/src/test/ui/inline-asm-bad-operand.stderr b/src/test/ui/inline-asm-bad-operand.stderr index b8e7e9acfec..fe6c6c99141 100644 --- a/src/test/ui/inline-asm-bad-operand.stderr +++ b/src/test/ui/inline-asm-bad-operand.stderr @@ -1,41 +1,41 @@ error[E0669]: invalid value for constraint in inline assembly - --> $DIR/inline-asm-bad-operand.rs:21:24 + --> $DIR/inline-asm-bad-operand.rs:22:24 | LL | asm!("" :: "r"("")); | ^^ error[E0669]: invalid value for constraint in inline assembly - --> $DIR/inline-asm-bad-operand.rs:26:32 + --> $DIR/inline-asm-bad-operand.rs:27:32 | LL | asm!("ret" : : "{rdi}"(target)); | ^^^^^^ error[E0669]: invalid value for constraint in inline assembly - --> $DIR/inline-asm-bad-operand.rs:33:29 + --> $DIR/inline-asm-bad-operand.rs:34:29 | LL | unsafe { asm!("" :: "i"(hello)) }; | ^^^^^ error[E0669]: invalid value for constraint in inline assembly - --> $DIR/inline-asm-bad-operand.rs:41:38 + --> $DIR/inline-asm-bad-operand.rs:42:38 | LL | asm!("movups $1, %xmm0"::"m"(arr)); | ^^^ error[E0669]: invalid value for constraint in inline assembly - --> $DIR/inline-asm-bad-operand.rs:48:32 + --> $DIR/inline-asm-bad-operand.rs:49:32 | LL | asm!("mov sp, $0"::"r"(addr)); | ^^^^ error[E0669]: invalid value for constraint in inline assembly - --> $DIR/inline-asm-bad-operand.rs:55:32 + --> $DIR/inline-asm-bad-operand.rs:56:32 | LL | asm!("mov sp, $0"::"r"(addr), | ^^^^ error[E0669]: invalid value for constraint in inline assembly - --> $DIR/inline-asm-bad-operand.rs:56:32 + --> $DIR/inline-asm-bad-operand.rs:57:32 | LL | ... "r"("hello e0669")); | ^^^^^^^^^^^^^ diff --git a/src/test/ui/issues/issue-11154.rs b/src/test/ui/issues/issue-11154.rs index 7513abd8a5b..e11cdc82f32 100644 --- a/src/test/ui/issues/issue-11154.rs +++ b/src/test/ui/issues/issue-11154.rs @@ -1,3 +1,4 @@ +// build-fail // compile-flags: -C lto -C prefer-dynamic // error-pattern: cannot prefer dynamic linking diff --git a/src/test/ui/issues/issue-15919-64.rs b/src/test/ui/issues/issue-15919-64.rs index abd20cc1cee..3ecbd34eaaa 100644 --- a/src/test/ui/issues/issue-15919-64.rs +++ b/src/test/ui/issues/issue-15919-64.rs @@ -1,3 +1,4 @@ +// build-fail // ignore-32bit // FIXME https://github.com/rust-lang/rust/issues/59774 diff --git a/src/test/ui/issues/issue-15919-64.stderr b/src/test/ui/issues/issue-15919-64.stderr index 571b87d9961..f624c96ce84 100644 --- a/src/test/ui/issues/issue-15919-64.stderr +++ b/src/test/ui/issues/issue-15919-64.stderr @@ -1,5 +1,5 @@ error: the type `[usize; 18446744073709551615]` is too big for the current architecture - --> $DIR/issue-15919-64.rs:8:9 + --> $DIR/issue-15919-64.rs:9:9 | LL | let x = [0usize; 0xffff_ffff_ffff_ffff]; | ^ diff --git a/src/test/ui/issues/issue-17913.rs b/src/test/ui/issues/issue-17913.rs index 48d8f407aa1..ca13b9bd6ae 100644 --- a/src/test/ui/issues/issue-17913.rs +++ b/src/test/ui/issues/issue-17913.rs @@ -1,3 +1,4 @@ +// build-fail // normalize-stderr-test "\[&usize; \d+\]" -> "[&usize; N]" // error-pattern: too big for the current architecture diff --git a/src/test/ui/issues/issue-22638.rs b/src/test/ui/issues/issue-22638.rs index fab24404eba..72c16fddb4b 100644 --- a/src/test/ui/issues/issue-22638.rs +++ b/src/test/ui/issues/issue-22638.rs @@ -1,3 +1,4 @@ +// build-fail // normalize-stderr-test: "<\[closure@.+`" -> "$$CLOSURE`" #![allow(unused)] diff --git a/src/test/ui/issues/issue-22638.stderr b/src/test/ui/issues/issue-22638.stderr index b60e1c29ec0..83dd93b853d 100644 --- a/src/test/ui/issues/issue-22638.stderr +++ b/src/test/ui/issues/issue-22638.stderr @@ -1,5 +1,5 @@ error: reached the type-length limit while instantiating `D::matches::$CLOSURE` - --> $DIR/issue-22638.rs:52:5 + --> $DIR/issue-22638.rs:53:5 | LL | / pub fn matches(&self, f: &F) { LL | | diff --git a/src/test/ui/issues/issue-23458.rs b/src/test/ui/issues/issue-23458.rs index 90b3f1f9714..521db37170a 100644 --- a/src/test/ui/issues/issue-23458.rs +++ b/src/test/ui/issues/issue-23458.rs @@ -1,5 +1,6 @@ #![feature(asm)] +// build-fail // only-x86_64 fn main() { diff --git a/src/test/ui/issues/issue-23458.stderr b/src/test/ui/issues/issue-23458.stderr index aff0f82af6f..76c3e6da82e 100644 --- a/src/test/ui/issues/issue-23458.stderr +++ b/src/test/ui/issues/issue-23458.stderr @@ -1,5 +1,5 @@ error: invalid operand in inline asm: 'int $3' - --> $DIR/issue-23458.rs:7:9 + --> $DIR/issue-23458.rs:8:9 | LL | asm!("int $3"); | ^^^^^^^^^^^^^^^ @@ -8,7 +8,7 @@ error: :1:2: error: too few operands for instruction int ^ - --> $DIR/issue-23458.rs:7:9 + --> $DIR/issue-23458.rs:8:9 | LL | asm!("int $3"); | ^^^^^^^^^^^^^^^ diff --git a/src/test/ui/issues/issue-26548.rs b/src/test/ui/issues/issue-26548.rs index 5b6c77d0bd1..6ee8c0fcfda 100644 --- a/src/test/ui/issues/issue-26548.rs +++ b/src/test/ui/issues/issue-26548.rs @@ -2,6 +2,8 @@ //~| NOTE ...which requires computing layout of //~| NOTE ...which again requires computing layout of +// build-fail + trait Mirror { type It: ?Sized; } impl Mirror for T { type It = Self; } struct S(Option<::It>); diff --git a/src/test/ui/issues/issue-26548.stderr b/src/test/ui/issues/issue-26548.stderr index 7c1789cc1e9..3c213674e4b 100644 --- a/src/test/ui/issues/issue-26548.stderr +++ b/src/test/ui/issues/issue-26548.stderr @@ -3,7 +3,7 @@ error[E0391]: cycle detected when computing layout of `std::option::Option` = note: ...which requires computing layout of `S`... = note: ...which again requires computing layout of `std::option::Option`, completing the cycle note: cycle used when processing `main` - --> $DIR/issue-26548.rs:9:1 + --> $DIR/issue-26548.rs:11:1 | LL | fn main() { | ^^^^^^^^^ diff --git a/src/test/ui/issues/issue-37311-type-length-limit/issue-37311.rs b/src/test/ui/issues/issue-37311-type-length-limit/issue-37311.rs index 9a8dafe1394..fec4b171536 100644 --- a/src/test/ui/issues/issue-37311-type-length-limit/issue-37311.rs +++ b/src/test/ui/issues/issue-37311-type-length-limit/issue-37311.rs @@ -1,3 +1,5 @@ +// build-fail + trait Mirror { type Image; } diff --git a/src/test/ui/issues/issue-37311-type-length-limit/issue-37311.stderr b/src/test/ui/issues/issue-37311-type-length-limit/issue-37311.stderr index aead415d23f..7a4b59b5633 100644 --- a/src/test/ui/issues/issue-37311-type-length-limit/issue-37311.stderr +++ b/src/test/ui/issues/issue-37311-type-length-limit/issue-37311.stderr @@ -1,5 +1,5 @@ error: reached the type-length limit while instantiating `<(&(&(&(&(&(&(&(&(&(&(&(&(&(&(&(...))))))))))))))) as Foo>::recurse` - --> $DIR/issue-37311.rs:13:5 + --> $DIR/issue-37311.rs:15:5 | LL | / fn recurse(&self) { LL | | (self, self).recurse(); diff --git a/src/test/ui/issues/issue-37433.rs b/src/test/ui/issues/issue-37433.rs index d3663e24e60..c4d427f3ad3 100644 --- a/src/test/ui/issues/issue-37433.rs +++ b/src/test/ui/issues/issue-37433.rs @@ -1,3 +1,4 @@ +// build-fail // ignore-emscripten no asm! support #![feature(asm)] diff --git a/src/test/ui/issues/issue-37433.stderr b/src/test/ui/issues/issue-37433.stderr index 956694fc2cd..d9e1c98e9ee 100644 --- a/src/test/ui/issues/issue-37433.stderr +++ b/src/test/ui/issues/issue-37433.stderr @@ -1,5 +1,5 @@ error[E0669]: invalid value for constraint in inline assembly - --> $DIR/issue-37433.rs:7:24 + --> $DIR/issue-37433.rs:8:24 | LL | asm!("" :: "r"("")); | ^^ diff --git a/src/test/ui/issues/issue-53787-inline-assembler-macro.rs b/src/test/ui/issues/issue-53787-inline-assembler-macro.rs index 09e8d55c06b..d911ac5efbe 100644 --- a/src/test/ui/issues/issue-53787-inline-assembler-macro.rs +++ b/src/test/ui/issues/issue-53787-inline-assembler-macro.rs @@ -1,5 +1,6 @@ // Regression test for Issue #53787: Fix ICE when creating a label in inline assembler with macros. +// build-fail // ignore-emscripten #![feature(asm)] diff --git a/src/test/ui/issues/issue-53787-inline-assembler-macro.stderr b/src/test/ui/issues/issue-53787-inline-assembler-macro.stderr index f96bcaa492c..b066474f924 100644 --- a/src/test/ui/issues/issue-53787-inline-assembler-macro.stderr +++ b/src/test/ui/issues/issue-53787-inline-assembler-macro.stderr @@ -1,5 +1,5 @@ error[E0669]: invalid value for constraint in inline assembly - --> $DIR/issue-53787-inline-assembler-macro.rs:23:16 + --> $DIR/issue-53787-inline-assembler-macro.rs:24:16 | LL | fake_jump!("FirstFunc"); | ^^^^^^^^^^^ diff --git a/src/test/ui/issues/issue-54348.rs b/src/test/ui/issues/issue-54348.rs index 68d83805477..fd9a9e024aa 100644 --- a/src/test/ui/issues/issue-54348.rs +++ b/src/test/ui/issues/issue-54348.rs @@ -1,3 +1,5 @@ +// build-fail + fn main() { [1][0u64 as usize]; [1][1.5 as usize]; //~ ERROR index out of bounds diff --git a/src/test/ui/issues/issue-54348.stderr b/src/test/ui/issues/issue-54348.stderr index fa77bd6fd77..7619cd7437e 100644 --- a/src/test/ui/issues/issue-54348.stderr +++ b/src/test/ui/issues/issue-54348.stderr @@ -1,5 +1,5 @@ error: index out of bounds: the len is 1 but the index is 1 - --> $DIR/issue-54348.rs:3:5 + --> $DIR/issue-54348.rs:5:5 | LL | [1][1.5 as usize]; | ^^^^^^^^^^^^^^^^^ @@ -7,7 +7,7 @@ LL | [1][1.5 as usize]; = note: `#[deny(const_err)]` on by default error: index out of bounds: the len is 1 but the index is 1 - --> $DIR/issue-54348.rs:4:5 + --> $DIR/issue-54348.rs:6:5 | LL | [1][1u64 as usize]; | ^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/issues/issue-8460-const.rs b/src/test/ui/issues/issue-8460-const.rs index 71e2b58031c..c18a0d4d6cb 100644 --- a/src/test/ui/issues/issue-8460-const.rs +++ b/src/test/ui/issues/issue-8460-const.rs @@ -1,3 +1,4 @@ +// build-fail // compile-flags: -O #![deny(const_err)] diff --git a/src/test/ui/issues/issue-8460-const.stderr b/src/test/ui/issues/issue-8460-const.stderr index c6750e653d7..170747f8402 100644 --- a/src/test/ui/issues/issue-8460-const.stderr +++ b/src/test/ui/issues/issue-8460-const.stderr @@ -1,185 +1,185 @@ error: attempt to divide with overflow - --> $DIR/issue-8460-const.rs:9:36 + --> $DIR/issue-8460-const.rs:10:36 | LL | assert!(thread::spawn(move|| { isize::MIN / -1; }).join().is_err()); | ^^^^^^^^^^^^^^^ | note: lint level defined here - --> $DIR/issue-8460-const.rs:3:9 + --> $DIR/issue-8460-const.rs:4:9 | LL | #![deny(const_err)] | ^^^^^^^^^ error: this expression will panic at runtime - --> $DIR/issue-8460-const.rs:9:36 + --> $DIR/issue-8460-const.rs:10:36 | LL | assert!(thread::spawn(move|| { isize::MIN / -1; }).join().is_err()); | ^^^^^^^^^^^^^^^ attempt to divide with overflow error: attempt to divide with overflow - --> $DIR/issue-8460-const.rs:12:36 + --> $DIR/issue-8460-const.rs:13:36 | LL | assert!(thread::spawn(move|| { i8::MIN / -1; }).join().is_err()); | ^^^^^^^^^^^^ error: this expression will panic at runtime - --> $DIR/issue-8460-const.rs:12:36 + --> $DIR/issue-8460-const.rs:13:36 | LL | assert!(thread::spawn(move|| { i8::MIN / -1; }).join().is_err()); | ^^^^^^^^^^^^ attempt to divide with overflow error: attempt to divide with overflow - --> $DIR/issue-8460-const.rs:15:36 + --> $DIR/issue-8460-const.rs:16:36 | LL | assert!(thread::spawn(move|| { i16::MIN / -1; }).join().is_err()); | ^^^^^^^^^^^^^ error: this expression will panic at runtime - --> $DIR/issue-8460-const.rs:15:36 + --> $DIR/issue-8460-const.rs:16:36 | LL | assert!(thread::spawn(move|| { i16::MIN / -1; }).join().is_err()); | ^^^^^^^^^^^^^ attempt to divide with overflow error: attempt to divide with overflow - --> $DIR/issue-8460-const.rs:18:36 + --> $DIR/issue-8460-const.rs:19:36 | LL | assert!(thread::spawn(move|| { i32::MIN / -1; }).join().is_err()); | ^^^^^^^^^^^^^ error: this expression will panic at runtime - --> $DIR/issue-8460-const.rs:18:36 + --> $DIR/issue-8460-const.rs:19:36 | LL | assert!(thread::spawn(move|| { i32::MIN / -1; }).join().is_err()); | ^^^^^^^^^^^^^ attempt to divide with overflow error: attempt to divide with overflow - --> $DIR/issue-8460-const.rs:21:36 + --> $DIR/issue-8460-const.rs:22:36 | LL | assert!(thread::spawn(move|| { i64::MIN / -1; }).join().is_err()); | ^^^^^^^^^^^^^ error: this expression will panic at runtime - --> $DIR/issue-8460-const.rs:21:36 + --> $DIR/issue-8460-const.rs:22:36 | LL | assert!(thread::spawn(move|| { i64::MIN / -1; }).join().is_err()); | ^^^^^^^^^^^^^ attempt to divide with overflow error: attempt to divide by zero - --> $DIR/issue-8460-const.rs:24:36 + --> $DIR/issue-8460-const.rs:25:36 | LL | assert!(thread::spawn(move|| { 1isize / 0; }).join().is_err()); | ^^^^^^^^^^ error: attempt to divide by zero - --> $DIR/issue-8460-const.rs:26:36 + --> $DIR/issue-8460-const.rs:27:36 | LL | assert!(thread::spawn(move|| { 1i8 / 0; }).join().is_err()); | ^^^^^^^ error: attempt to divide by zero - --> $DIR/issue-8460-const.rs:28:36 + --> $DIR/issue-8460-const.rs:29:36 | LL | assert!(thread::spawn(move|| { 1i16 / 0; }).join().is_err()); | ^^^^^^^^ error: attempt to divide by zero - --> $DIR/issue-8460-const.rs:30:36 + --> $DIR/issue-8460-const.rs:31:36 | LL | assert!(thread::spawn(move|| { 1i32 / 0; }).join().is_err()); | ^^^^^^^^ error: attempt to divide by zero - --> $DIR/issue-8460-const.rs:32:36 + --> $DIR/issue-8460-const.rs:33:36 | LL | assert!(thread::spawn(move|| { 1i64 / 0; }).join().is_err()); | ^^^^^^^^ error: attempt to calculate the remainder with overflow - --> $DIR/issue-8460-const.rs:34:36 + --> $DIR/issue-8460-const.rs:35:36 | LL | assert!(thread::spawn(move|| { isize::MIN % -1; }).join().is_err()); | ^^^^^^^^^^^^^^^ error: this expression will panic at runtime - --> $DIR/issue-8460-const.rs:34:36 + --> $DIR/issue-8460-const.rs:35:36 | LL | assert!(thread::spawn(move|| { isize::MIN % -1; }).join().is_err()); | ^^^^^^^^^^^^^^^ attempt to calculate the remainder with overflow error: attempt to calculate the remainder with overflow - --> $DIR/issue-8460-const.rs:37:36 + --> $DIR/issue-8460-const.rs:38:36 | LL | assert!(thread::spawn(move|| { i8::MIN % -1; }).join().is_err()); | ^^^^^^^^^^^^ error: this expression will panic at runtime - --> $DIR/issue-8460-const.rs:37:36 + --> $DIR/issue-8460-const.rs:38:36 | LL | assert!(thread::spawn(move|| { i8::MIN % -1; }).join().is_err()); | ^^^^^^^^^^^^ attempt to calculate the remainder with overflow error: attempt to calculate the remainder with overflow - --> $DIR/issue-8460-const.rs:40:36 + --> $DIR/issue-8460-const.rs:41:36 | LL | assert!(thread::spawn(move|| { i16::MIN % -1; }).join().is_err()); | ^^^^^^^^^^^^^ error: this expression will panic at runtime - --> $DIR/issue-8460-const.rs:40:36 + --> $DIR/issue-8460-const.rs:41:36 | LL | assert!(thread::spawn(move|| { i16::MIN % -1; }).join().is_err()); | ^^^^^^^^^^^^^ attempt to calculate the remainder with overflow error: attempt to calculate the remainder with overflow - --> $DIR/issue-8460-const.rs:43:36 + --> $DIR/issue-8460-const.rs:44:36 | LL | assert!(thread::spawn(move|| { i32::MIN % -1; }).join().is_err()); | ^^^^^^^^^^^^^ error: this expression will panic at runtime - --> $DIR/issue-8460-const.rs:43:36 + --> $DIR/issue-8460-const.rs:44:36 | LL | assert!(thread::spawn(move|| { i32::MIN % -1; }).join().is_err()); | ^^^^^^^^^^^^^ attempt to calculate the remainder with overflow error: attempt to calculate the remainder with overflow - --> $DIR/issue-8460-const.rs:46:36 + --> $DIR/issue-8460-const.rs:47:36 | LL | assert!(thread::spawn(move|| { i64::MIN % -1; }).join().is_err()); | ^^^^^^^^^^^^^ error: this expression will panic at runtime - --> $DIR/issue-8460-const.rs:46:36 + --> $DIR/issue-8460-const.rs:47:36 | LL | assert!(thread::spawn(move|| { i64::MIN % -1; }).join().is_err()); | ^^^^^^^^^^^^^ attempt to calculate the remainder with overflow error: attempt to calculate the remainder with a divisor of zero - --> $DIR/issue-8460-const.rs:49:36 + --> $DIR/issue-8460-const.rs:50:36 | LL | assert!(thread::spawn(move|| { 1isize % 0; }).join().is_err()); | ^^^^^^^^^^ error: attempt to calculate the remainder with a divisor of zero - --> $DIR/issue-8460-const.rs:51:36 + --> $DIR/issue-8460-const.rs:52:36 | LL | assert!(thread::spawn(move|| { 1i8 % 0; }).join().is_err()); | ^^^^^^^ error: attempt to calculate the remainder with a divisor of zero - --> $DIR/issue-8460-const.rs:53:36 + --> $DIR/issue-8460-const.rs:54:36 | LL | assert!(thread::spawn(move|| { 1i16 % 0; }).join().is_err()); | ^^^^^^^^ error: attempt to calculate the remainder with a divisor of zero - --> $DIR/issue-8460-const.rs:55:36 + --> $DIR/issue-8460-const.rs:56:36 | LL | assert!(thread::spawn(move|| { 1i32 % 0; }).join().is_err()); | ^^^^^^^^ error: attempt to calculate the remainder with a divisor of zero - --> $DIR/issue-8460-const.rs:57:36 + --> $DIR/issue-8460-const.rs:58:36 | LL | assert!(thread::spawn(move|| { 1i64 % 0; }).join().is_err()); | ^^^^^^^^ diff --git a/src/test/ui/issues/issue-8460-const2.rs b/src/test/ui/issues/issue-8460-const2.rs index 723a17940a3..0ca850abc1b 100644 --- a/src/test/ui/issues/issue-8460-const2.rs +++ b/src/test/ui/issues/issue-8460-const2.rs @@ -1,3 +1,4 @@ +// build-fail // compile-flags: -C overflow-checks=on -O #![deny(const_err)] diff --git a/src/test/ui/issues/issue-8460-const2.stderr b/src/test/ui/issues/issue-8460-const2.stderr index 87b9b2daa6f..6ad186fb21c 100644 --- a/src/test/ui/issues/issue-8460-const2.stderr +++ b/src/test/ui/issues/issue-8460-const2.stderr @@ -1,125 +1,125 @@ error: attempt to divide with overflow - --> $DIR/issue-8460-const2.rs:9:36 + --> $DIR/issue-8460-const2.rs:10:36 | LL | assert!(thread::spawn(move|| { isize::MIN / -1; }).join().is_err()); | ^^^^^^^^^^^^^^^ | note: lint level defined here - --> $DIR/issue-8460-const2.rs:3:9 + --> $DIR/issue-8460-const2.rs:4:9 | LL | #![deny(const_err)] | ^^^^^^^^^ error: attempt to divide with overflow - --> $DIR/issue-8460-const2.rs:11:36 + --> $DIR/issue-8460-const2.rs:12:36 | LL | assert!(thread::spawn(move|| { i8::MIN / -1; }).join().is_err()); | ^^^^^^^^^^^^ error: attempt to divide with overflow - --> $DIR/issue-8460-const2.rs:13:36 + --> $DIR/issue-8460-const2.rs:14:36 | LL | assert!(thread::spawn(move|| { i16::MIN / -1; }).join().is_err()); | ^^^^^^^^^^^^^ error: attempt to divide with overflow - --> $DIR/issue-8460-const2.rs:15:36 + --> $DIR/issue-8460-const2.rs:16:36 | LL | assert!(thread::spawn(move|| { i32::MIN / -1; }).join().is_err()); | ^^^^^^^^^^^^^ error: attempt to divide with overflow - --> $DIR/issue-8460-const2.rs:17:36 + --> $DIR/issue-8460-const2.rs:18:36 | LL | assert!(thread::spawn(move|| { i64::MIN / -1; }).join().is_err()); | ^^^^^^^^^^^^^ error: attempt to divide by zero - --> $DIR/issue-8460-const2.rs:19:36 + --> $DIR/issue-8460-const2.rs:20:36 | LL | assert!(thread::spawn(move|| { 1isize / 0; }).join().is_err()); | ^^^^^^^^^^ error: attempt to divide by zero - --> $DIR/issue-8460-const2.rs:21:36 + --> $DIR/issue-8460-const2.rs:22:36 | LL | assert!(thread::spawn(move|| { 1i8 / 0; }).join().is_err()); | ^^^^^^^ error: attempt to divide by zero - --> $DIR/issue-8460-const2.rs:23:36 + --> $DIR/issue-8460-const2.rs:24:36 | LL | assert!(thread::spawn(move|| { 1i16 / 0; }).join().is_err()); | ^^^^^^^^ error: attempt to divide by zero - --> $DIR/issue-8460-const2.rs:25:36 + --> $DIR/issue-8460-const2.rs:26:36 | LL | assert!(thread::spawn(move|| { 1i32 / 0; }).join().is_err()); | ^^^^^^^^ error: attempt to divide by zero - --> $DIR/issue-8460-const2.rs:27:36 + --> $DIR/issue-8460-const2.rs:28:36 | LL | assert!(thread::spawn(move|| { 1i64 / 0; }).join().is_err()); | ^^^^^^^^ error: attempt to calculate the remainder with overflow - --> $DIR/issue-8460-const2.rs:29:36 + --> $DIR/issue-8460-const2.rs:30:36 | LL | assert!(thread::spawn(move|| { isize::MIN % -1; }).join().is_err()); | ^^^^^^^^^^^^^^^ error: attempt to calculate the remainder with overflow - --> $DIR/issue-8460-const2.rs:31:36 + --> $DIR/issue-8460-const2.rs:32:36 | LL | assert!(thread::spawn(move|| { i8::MIN % -1; }).join().is_err()); | ^^^^^^^^^^^^ error: attempt to calculate the remainder with overflow - --> $DIR/issue-8460-const2.rs:33:36 + --> $DIR/issue-8460-const2.rs:34:36 | LL | assert!(thread::spawn(move|| { i16::MIN % -1; }).join().is_err()); | ^^^^^^^^^^^^^ error: attempt to calculate the remainder with overflow - --> $DIR/issue-8460-const2.rs:35:36 + --> $DIR/issue-8460-const2.rs:36:36 | LL | assert!(thread::spawn(move|| { i32::MIN % -1; }).join().is_err()); | ^^^^^^^^^^^^^ error: attempt to calculate the remainder with overflow - --> $DIR/issue-8460-const2.rs:37:36 + --> $DIR/issue-8460-const2.rs:38:36 | LL | assert!(thread::spawn(move|| { i64::MIN % -1; }).join().is_err()); | ^^^^^^^^^^^^^ error: attempt to calculate the remainder with a divisor of zero - --> $DIR/issue-8460-const2.rs:39:36 + --> $DIR/issue-8460-const2.rs:40:36 | LL | assert!(thread::spawn(move|| { 1isize % 0; }).join().is_err()); | ^^^^^^^^^^ error: attempt to calculate the remainder with a divisor of zero - --> $DIR/issue-8460-const2.rs:41:36 + --> $DIR/issue-8460-const2.rs:42:36 | LL | assert!(thread::spawn(move|| { 1i8 % 0; }).join().is_err()); | ^^^^^^^ error: attempt to calculate the remainder with a divisor of zero - --> $DIR/issue-8460-const2.rs:43:36 + --> $DIR/issue-8460-const2.rs:44:36 | LL | assert!(thread::spawn(move|| { 1i16 % 0; }).join().is_err()); | ^^^^^^^^ error: attempt to calculate the remainder with a divisor of zero - --> $DIR/issue-8460-const2.rs:45:36 + --> $DIR/issue-8460-const2.rs:46:36 | LL | assert!(thread::spawn(move|| { 1i32 % 0; }).join().is_err()); | ^^^^^^^^ error: attempt to calculate the remainder with a divisor of zero - --> $DIR/issue-8460-const2.rs:47:36 + --> $DIR/issue-8460-const2.rs:48:36 | LL | assert!(thread::spawn(move|| { 1i64 % 0; }).join().is_err()); | ^^^^^^^^ diff --git a/src/test/ui/issues/issue-8727.rs b/src/test/ui/issues/issue-8727.rs index 473d237cd87..80f360155cb 100644 --- a/src/test/ui/issues/issue-8727.rs +++ b/src/test/ui/issues/issue-8727.rs @@ -1,6 +1,8 @@ // Verify the compiler fails with an error on infinite function // recursions. +// build-fail + fn generic() { generic::>(); } diff --git a/src/test/ui/issues/issue-8727.stderr b/src/test/ui/issues/issue-8727.stderr index df01f42ce26..2fd6ea5dc82 100644 --- a/src/test/ui/issues/issue-8727.stderr +++ b/src/test/ui/issues/issue-8727.stderr @@ -1,5 +1,5 @@ warning: function cannot return without recursing - --> $DIR/issue-8727.rs:4:1 + --> $DIR/issue-8727.rs:6:1 | LL | fn generic() { | ^^^^^^^^^^^^^^^ cannot return without recursing @@ -10,7 +10,7 @@ LL | generic::>(); = help: a `loop` may express intention better if this is on purpose error: reached the recursion limit while instantiating `generic::>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` - --> $DIR/issue-8727.rs:4:1 + --> $DIR/issue-8727.rs:6:1 | LL | / fn generic() { LL | | generic::>(); diff --git a/src/test/ui/linkage-attr/linkage-detect-extern-generated-name-collision.rs b/src/test/ui/linkage-attr/linkage-detect-extern-generated-name-collision.rs index 85a9a336b0d..7b2f5365aca 100644 --- a/src/test/ui/linkage-attr/linkage-detect-extern-generated-name-collision.rs +++ b/src/test/ui/linkage-attr/linkage-detect-extern-generated-name-collision.rs @@ -2,6 +2,7 @@ // collision on the symbol generated for the external linkage item in // an extern crate. +// build-fail // aux-build:def_colliding_external.rs extern crate def_colliding_external as dep1; diff --git a/src/test/ui/linkage-attr/linkage-detect-local-generated-name-collision.rs b/src/test/ui/linkage-attr/linkage-detect-local-generated-name-collision.rs index dc15798e16a..1e5069612fb 100644 --- a/src/test/ui/linkage-attr/linkage-detect-local-generated-name-collision.rs +++ b/src/test/ui/linkage-attr/linkage-detect-local-generated-name-collision.rs @@ -1,3 +1,5 @@ +// build-fail + #![feature(linkage)] mod dep1 { diff --git a/src/test/ui/linkage-attr/linkage-detect-local-generated-name-collision.stderr b/src/test/ui/linkage-attr/linkage-detect-local-generated-name-collision.stderr index 117c76f7f26..d008acc6e7c 100644 --- a/src/test/ui/linkage-attr/linkage-detect-local-generated-name-collision.stderr +++ b/src/test/ui/linkage-attr/linkage-detect-local-generated-name-collision.stderr @@ -1,5 +1,5 @@ error: symbol `collision` is already defined - --> $DIR/linkage-detect-local-generated-name-collision.rs:7:9 + --> $DIR/linkage-detect-local-generated-name-collision.rs:9:9 | LL | pub static collision: *const i32; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/linkage-attr/linkage-requires-raw-ptr.rs b/src/test/ui/linkage-attr/linkage-requires-raw-ptr.rs index 014c715be0d..93afc537f7c 100644 --- a/src/test/ui/linkage-attr/linkage-requires-raw-ptr.rs +++ b/src/test/ui/linkage-attr/linkage-requires-raw-ptr.rs @@ -1,6 +1,7 @@ // rust-lang/rust#59548: We used to ICE when trying to use a static // with a type that violated its own `#[linkage]`. +// build-fail // aux-build:def_illtyped_external.rs extern crate def_illtyped_external as dep; diff --git a/src/test/ui/linkage-attr/linkage2.rs b/src/test/ui/linkage-attr/linkage2.rs index c8af1a69979..41e7819e8cd 100644 --- a/src/test/ui/linkage-attr/linkage2.rs +++ b/src/test/ui/linkage-attr/linkage2.rs @@ -1,4 +1,6 @@ // FIXME https://github.com/rust-lang/rust/issues/59774 + +// build-fail // normalize-stderr-test "thread.*panicked.*Metadata module not compiled.*\n" -> "" // normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> "" // ignore-sgx no weak linkages permitted diff --git a/src/test/ui/linkage-attr/linkage2.stderr b/src/test/ui/linkage-attr/linkage2.stderr index 2654ffd67b6..72ee3fb62ec 100644 --- a/src/test/ui/linkage-attr/linkage2.stderr +++ b/src/test/ui/linkage-attr/linkage2.stderr @@ -1,5 +1,5 @@ error: must have type `*const T` or `*mut T` due to `#[linkage]` attribute - --> $DIR/linkage2.rs:9:32 + --> $DIR/linkage2.rs:11:32 | LL | #[linkage = "extern_weak"] static foo: i32; | ^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/linkage-attr/linkage3.rs b/src/test/ui/linkage-attr/linkage3.rs index 1462079acf7..bd4e5ba2d4a 100644 --- a/src/test/ui/linkage-attr/linkage3.rs +++ b/src/test/ui/linkage-attr/linkage3.rs @@ -1,4 +1,6 @@ // FIXME https://github.com/rust-lang/rust/issues/59774 + +// build-fail // normalize-stderr-test "thread.*panicked.*Metadata module not compiled.*\n" -> "" // normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> "" diff --git a/src/test/ui/linkage-attr/linkage3.stderr b/src/test/ui/linkage-attr/linkage3.stderr index b74fdc91429..5a0833f2f74 100644 --- a/src/test/ui/linkage-attr/linkage3.stderr +++ b/src/test/ui/linkage-attr/linkage3.stderr @@ -1,5 +1,5 @@ error: invalid linkage specified - --> $DIR/linkage3.rs:8:24 + --> $DIR/linkage3.rs:10:24 | LL | #[linkage = "foo"] static foo: *const i32; | ^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/lint/lint-exceeding-bitshifts.rs b/src/test/ui/lint/lint-exceeding-bitshifts.rs index dd3b8393429..121e5b796bb 100644 --- a/src/test/ui/lint/lint-exceeding-bitshifts.rs +++ b/src/test/ui/lint/lint-exceeding-bitshifts.rs @@ -1,3 +1,4 @@ +// build-fail // compile-flags: -O #![deny(exceeding_bitshifts, const_err)] diff --git a/src/test/ui/lint/lint-exceeding-bitshifts.stderr b/src/test/ui/lint/lint-exceeding-bitshifts.stderr index 25e079b6d81..203cb741539 100644 --- a/src/test/ui/lint/lint-exceeding-bitshifts.stderr +++ b/src/test/ui/lint/lint-exceeding-bitshifts.stderr @@ -1,113 +1,113 @@ error: attempt to shift left with overflow - --> $DIR/lint-exceeding-bitshifts.rs:9:15 + --> $DIR/lint-exceeding-bitshifts.rs:10:15 | LL | let n = 1u8 << 8; | ^^^^^^^^ | note: lint level defined here - --> $DIR/lint-exceeding-bitshifts.rs:3:9 + --> $DIR/lint-exceeding-bitshifts.rs:4:9 | LL | #![deny(exceeding_bitshifts, const_err)] | ^^^^^^^^^^^^^^^^^^^ error: attempt to shift left with overflow - --> $DIR/lint-exceeding-bitshifts.rs:11:15 + --> $DIR/lint-exceeding-bitshifts.rs:12:15 | LL | let n = 1u16 << 16; | ^^^^^^^^^^ error: attempt to shift left with overflow - --> $DIR/lint-exceeding-bitshifts.rs:13:15 + --> $DIR/lint-exceeding-bitshifts.rs:14:15 | LL | let n = 1u32 << 32; | ^^^^^^^^^^ error: attempt to shift left with overflow - --> $DIR/lint-exceeding-bitshifts.rs:15:15 + --> $DIR/lint-exceeding-bitshifts.rs:16:15 | LL | let n = 1u64 << 64; | ^^^^^^^^^^ error: attempt to shift left with overflow - --> $DIR/lint-exceeding-bitshifts.rs:17:15 + --> $DIR/lint-exceeding-bitshifts.rs:18:15 | LL | let n = 1i8 << 8; | ^^^^^^^^ error: attempt to shift left with overflow - --> $DIR/lint-exceeding-bitshifts.rs:19:15 + --> $DIR/lint-exceeding-bitshifts.rs:20:15 | LL | let n = 1i16 << 16; | ^^^^^^^^^^ error: attempt to shift left with overflow - --> $DIR/lint-exceeding-bitshifts.rs:21:15 + --> $DIR/lint-exceeding-bitshifts.rs:22:15 | LL | let n = 1i32 << 32; | ^^^^^^^^^^ error: attempt to shift left with overflow - --> $DIR/lint-exceeding-bitshifts.rs:23:15 + --> $DIR/lint-exceeding-bitshifts.rs:24:15 | LL | let n = 1i64 << 64; | ^^^^^^^^^^ error: attempt to shift right with overflow - --> $DIR/lint-exceeding-bitshifts.rs:26:15 + --> $DIR/lint-exceeding-bitshifts.rs:27:15 | LL | let n = 1u8 >> 8; | ^^^^^^^^ error: attempt to shift right with overflow - --> $DIR/lint-exceeding-bitshifts.rs:28:15 + --> $DIR/lint-exceeding-bitshifts.rs:29:15 | LL | let n = 1u16 >> 16; | ^^^^^^^^^^ error: attempt to shift right with overflow - --> $DIR/lint-exceeding-bitshifts.rs:30:15 + --> $DIR/lint-exceeding-bitshifts.rs:31:15 | LL | let n = 1u32 >> 32; | ^^^^^^^^^^ error: attempt to shift right with overflow - --> $DIR/lint-exceeding-bitshifts.rs:32:15 + --> $DIR/lint-exceeding-bitshifts.rs:33:15 | LL | let n = 1u64 >> 64; | ^^^^^^^^^^ error: attempt to shift right with overflow - --> $DIR/lint-exceeding-bitshifts.rs:34:15 + --> $DIR/lint-exceeding-bitshifts.rs:35:15 | LL | let n = 1i8 >> 8; | ^^^^^^^^ error: attempt to shift right with overflow - --> $DIR/lint-exceeding-bitshifts.rs:36:15 + --> $DIR/lint-exceeding-bitshifts.rs:37:15 | LL | let n = 1i16 >> 16; | ^^^^^^^^^^ error: attempt to shift right with overflow - --> $DIR/lint-exceeding-bitshifts.rs:38:15 + --> $DIR/lint-exceeding-bitshifts.rs:39:15 | LL | let n = 1i32 >> 32; | ^^^^^^^^^^ error: attempt to shift right with overflow - --> $DIR/lint-exceeding-bitshifts.rs:40:15 + --> $DIR/lint-exceeding-bitshifts.rs:41:15 | LL | let n = 1i64 >> 64; | ^^^^^^^^^^ error: attempt to shift left with overflow - --> $DIR/lint-exceeding-bitshifts.rs:44:15 + --> $DIR/lint-exceeding-bitshifts.rs:45:15 | LL | let n = n << 8; | ^^^^^^ error: attempt to shift left with overflow - --> $DIR/lint-exceeding-bitshifts.rs:46:15 + --> $DIR/lint-exceeding-bitshifts.rs:47:15 | LL | let n = 1u8 << -8; | ^^^^^^^^^ diff --git a/src/test/ui/lint/lint-exceeding-bitshifts2.rs b/src/test/ui/lint/lint-exceeding-bitshifts2.rs index 2c213daddd7..2a7cbc10f77 100644 --- a/src/test/ui/lint/lint-exceeding-bitshifts2.rs +++ b/src/test/ui/lint/lint-exceeding-bitshifts2.rs @@ -1,3 +1,4 @@ +// build-fail // compile-flags: -O #![deny(exceeding_bitshifts, const_err)] diff --git a/src/test/ui/lint/lint-exceeding-bitshifts2.stderr b/src/test/ui/lint/lint-exceeding-bitshifts2.stderr index d9c76d233d0..49ac54ab834 100644 --- a/src/test/ui/lint/lint-exceeding-bitshifts2.stderr +++ b/src/test/ui/lint/lint-exceeding-bitshifts2.stderr @@ -1,29 +1,29 @@ error: attempt to shift left with overflow - --> $DIR/lint-exceeding-bitshifts2.rs:9:15 + --> $DIR/lint-exceeding-bitshifts2.rs:10:15 | LL | let n = 1u8 << (4+4); | ^^^^^^^^^^^^ | note: lint level defined here - --> $DIR/lint-exceeding-bitshifts2.rs:3:9 + --> $DIR/lint-exceeding-bitshifts2.rs:4:9 | LL | #![deny(exceeding_bitshifts, const_err)] | ^^^^^^^^^^^^^^^^^^^ error: attempt to shift right with overflow - --> $DIR/lint-exceeding-bitshifts2.rs:11:15 + --> $DIR/lint-exceeding-bitshifts2.rs:12:15 | LL | let n = 1i64 >> [64][0]; | ^^^^^^^^^^^^^^^ error: attempt to shift left with overflow - --> $DIR/lint-exceeding-bitshifts2.rs:17:15 + --> $DIR/lint-exceeding-bitshifts2.rs:18:15 | LL | let n = 1_isize << BITS; | ^^^^^^^^^^^^^^^ error: attempt to shift left with overflow - --> $DIR/lint-exceeding-bitshifts2.rs:18:15 + --> $DIR/lint-exceeding-bitshifts2.rs:19:15 | LL | let n = 1_usize << BITS; | ^^^^^^^^^^^^^^^ diff --git a/src/test/ui/lto-duplicate-symbols.rs b/src/test/ui/lto-duplicate-symbols.rs index c95e9fbf406..268cf261219 100644 --- a/src/test/ui/lto-duplicate-symbols.rs +++ b/src/test/ui/lto-duplicate-symbols.rs @@ -1,3 +1,4 @@ +// build-fail // aux-build:lto-duplicate-symbols1.rs // aux-build:lto-duplicate-symbols2.rs // error-pattern:Linking globals named 'foo': symbol multiply defined! diff --git a/src/test/ui/non-integer-atomic.rs b/src/test/ui/non-integer-atomic.rs index 00d07b7fe48..26d7e66ae3f 100644 --- a/src/test/ui/non-integer-atomic.rs +++ b/src/test/ui/non-integer-atomic.rs @@ -1,3 +1,5 @@ +// build-fail + #![feature(core_intrinsics)] #![allow(warnings)] #![crate_type = "rlib"] diff --git a/src/test/ui/non-integer-atomic.stderr b/src/test/ui/non-integer-atomic.stderr index 2a06b617aec..468e76da666 100644 --- a/src/test/ui/non-integer-atomic.stderr +++ b/src/test/ui/non-integer-atomic.stderr @@ -1,95 +1,95 @@ error[E0511]: invalid monomorphization of `atomic_load` intrinsic: expected basic integer type, found `bool` - --> $DIR/non-integer-atomic.rs:13:5 + --> $DIR/non-integer-atomic.rs:15:5 | LL | intrinsics::atomic_load(p); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `atomic_store` intrinsic: expected basic integer type, found `bool` - --> $DIR/non-integer-atomic.rs:18:5 + --> $DIR/non-integer-atomic.rs:20:5 | LL | intrinsics::atomic_store(p, v); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `atomic_xchg` intrinsic: expected basic integer type, found `bool` - --> $DIR/non-integer-atomic.rs:23:5 + --> $DIR/non-integer-atomic.rs:25:5 | LL | intrinsics::atomic_xchg(p, v); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `atomic_cxchg` intrinsic: expected basic integer type, found `bool` - --> $DIR/non-integer-atomic.rs:28:5 + --> $DIR/non-integer-atomic.rs:30:5 | LL | intrinsics::atomic_cxchg(p, v, v); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `atomic_load` intrinsic: expected basic integer type, found `Foo` - --> $DIR/non-integer-atomic.rs:33:5 + --> $DIR/non-integer-atomic.rs:35:5 | LL | intrinsics::atomic_load(p); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `atomic_store` intrinsic: expected basic integer type, found `Foo` - --> $DIR/non-integer-atomic.rs:38:5 + --> $DIR/non-integer-atomic.rs:40:5 | LL | intrinsics::atomic_store(p, v); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `atomic_xchg` intrinsic: expected basic integer type, found `Foo` - --> $DIR/non-integer-atomic.rs:43:5 + --> $DIR/non-integer-atomic.rs:45:5 | LL | intrinsics::atomic_xchg(p, v); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `atomic_cxchg` intrinsic: expected basic integer type, found `Foo` - --> $DIR/non-integer-atomic.rs:48:5 + --> $DIR/non-integer-atomic.rs:50:5 | LL | intrinsics::atomic_cxchg(p, v, v); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `atomic_load` intrinsic: expected basic integer type, found `&dyn std::ops::Fn()` - --> $DIR/non-integer-atomic.rs:53:5 + --> $DIR/non-integer-atomic.rs:55:5 | LL | intrinsics::atomic_load(p); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `atomic_store` intrinsic: expected basic integer type, found `&dyn std::ops::Fn()` - --> $DIR/non-integer-atomic.rs:58:5 + --> $DIR/non-integer-atomic.rs:60:5 | LL | intrinsics::atomic_store(p, v); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `atomic_xchg` intrinsic: expected basic integer type, found `&dyn std::ops::Fn()` - --> $DIR/non-integer-atomic.rs:63:5 + --> $DIR/non-integer-atomic.rs:65:5 | LL | intrinsics::atomic_xchg(p, v); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `atomic_cxchg` intrinsic: expected basic integer type, found `&dyn std::ops::Fn()` - --> $DIR/non-integer-atomic.rs:68:5 + --> $DIR/non-integer-atomic.rs:70:5 | LL | intrinsics::atomic_cxchg(p, v, v); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `atomic_load` intrinsic: expected basic integer type, found `[u8; 100]` - --> $DIR/non-integer-atomic.rs:73:5 + --> $DIR/non-integer-atomic.rs:75:5 | LL | intrinsics::atomic_load(p); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `atomic_store` intrinsic: expected basic integer type, found `[u8; 100]` - --> $DIR/non-integer-atomic.rs:78:5 + --> $DIR/non-integer-atomic.rs:80:5 | LL | intrinsics::atomic_store(p, v); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `atomic_xchg` intrinsic: expected basic integer type, found `[u8; 100]` - --> $DIR/non-integer-atomic.rs:83:5 + --> $DIR/non-integer-atomic.rs:85:5 | LL | intrinsics::atomic_xchg(p, v); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `atomic_cxchg` intrinsic: expected basic integer type, found `[u8; 100]` - --> $DIR/non-integer-atomic.rs:88:5 + --> $DIR/non-integer-atomic.rs:90:5 | LL | intrinsics::atomic_cxchg(p, v, v); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/panic-runtime/abort-link-to-unwind-dylib.rs b/src/test/ui/panic-runtime/abort-link-to-unwind-dylib.rs index c2deeb7dfd4..4b0f92456e0 100644 --- a/src/test/ui/panic-runtime/abort-link-to-unwind-dylib.rs +++ b/src/test/ui/panic-runtime/abort-link-to-unwind-dylib.rs @@ -1,3 +1,4 @@ +// build-fail // compile-flags:-C panic=abort -C prefer-dynamic // ignore-musl - no dylibs here // ignore-cloudabi diff --git a/src/test/ui/panic-runtime/transitive-link-a-bunch.rs b/src/test/ui/panic-runtime/transitive-link-a-bunch.rs index 5d72771c2dc..1848c986e36 100644 --- a/src/test/ui/panic-runtime/transitive-link-a-bunch.rs +++ b/src/test/ui/panic-runtime/transitive-link-a-bunch.rs @@ -1,3 +1,4 @@ +// build-fail // aux-build:panic-runtime-unwind.rs // aux-build:panic-runtime-abort.rs // aux-build:wants-panic-runtime-unwind.rs diff --git a/src/test/ui/panic-runtime/want-unwind-got-abort.rs b/src/test/ui/panic-runtime/want-unwind-got-abort.rs index 4c25c09d643..894a5eb38b8 100644 --- a/src/test/ui/panic-runtime/want-unwind-got-abort.rs +++ b/src/test/ui/panic-runtime/want-unwind-got-abort.rs @@ -1,3 +1,4 @@ +// build-fail // error-pattern:is incompatible with this crate's strategy of `unwind` // aux-build:panic-runtime-abort.rs // aux-build:panic-runtime-lang-items.rs diff --git a/src/test/ui/panic-runtime/want-unwind-got-abort2.rs b/src/test/ui/panic-runtime/want-unwind-got-abort2.rs index 478af451e7f..5955075bae5 100644 --- a/src/test/ui/panic-runtime/want-unwind-got-abort2.rs +++ b/src/test/ui/panic-runtime/want-unwind-got-abort2.rs @@ -1,3 +1,4 @@ +// build-fail // error-pattern:is incompatible with this crate's strategy of `unwind` // aux-build:panic-runtime-abort.rs // aux-build:wants-panic-runtime-abort.rs diff --git a/src/test/ui/print_type_sizes/zero-sized-fields.rs b/src/test/ui/print_type_sizes/zero-sized-fields.rs index 2ad488e8d8f..71d09167747 100644 --- a/src/test/ui/print_type_sizes/zero-sized-fields.rs +++ b/src/test/ui/print_type_sizes/zero-sized-fields.rs @@ -1,5 +1,6 @@ // compile-flags: -Z print-type-sizes // build-pass (FIXME(62277): could be check-pass?) +// ignore-pass // At one point, zero-sized fields such as those in this file were causing // incorrect output from `-Z print-type-sizes`. diff --git a/src/test/ui/recursion/recursion.rs b/src/test/ui/recursion/recursion.rs index ba3cc33dc30..9d939e13182 100644 --- a/src/test/ui/recursion/recursion.rs +++ b/src/test/ui/recursion/recursion.rs @@ -1,3 +1,5 @@ +// build-fail + enum Nil {NilValue} struct Cons {head:isize, tail:T} trait Dot {fn dot(&self, other:Self) -> isize;} diff --git a/src/test/ui/recursion/recursion.stderr b/src/test/ui/recursion/recursion.stderr index 751d56b70f1..17293720a43 100644 --- a/src/test/ui/recursion/recursion.stderr +++ b/src/test/ui/recursion/recursion.stderr @@ -1,5 +1,5 @@ error: reached the recursion limit while instantiating `test::>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` - --> $DIR/recursion.rs:12:1 + --> $DIR/recursion.rs:14:1 | LL | / fn test (n:isize, i:isize, first:T, second:T) ->isize { LL | | match n { 0 => {first.dot(second)} diff --git a/src/test/ui/required-lang-item.rs b/src/test/ui/required-lang-item.rs index ee3773675e0..3b17c5b7255 100644 --- a/src/test/ui/required-lang-item.rs +++ b/src/test/ui/required-lang-item.rs @@ -1,3 +1,5 @@ +// build-fail + #![feature(lang_items, no_core)] #![no_core] diff --git a/src/test/ui/rmeta_lib.rs b/src/test/ui/rmeta_lib.rs index 6c74aec32e3..fa6826450c9 100644 --- a/src/test/ui/rmeta_lib.rs +++ b/src/test/ui/rmeta_lib.rs @@ -1,3 +1,4 @@ +// build-fail // aux-build:rmeta-meta.rs // no-prefer-dynamic // error-pattern: crate `rmeta_meta` required to be available in rlib format, but was not found diff --git a/src/test/ui/simd-intrinsic/simd-intrinsic-generic-arithmetic-saturating.rs b/src/test/ui/simd-intrinsic/simd-intrinsic-generic-arithmetic-saturating.rs index 65cf31f2f1f..4d23a1911a3 100644 --- a/src/test/ui/simd-intrinsic/simd-intrinsic-generic-arithmetic-saturating.rs +++ b/src/test/ui/simd-intrinsic/simd-intrinsic-generic-arithmetic-saturating.rs @@ -1,3 +1,4 @@ +// build-fail // ignore-emscripten // ignore-tidy-linelength #![feature(repr_simd, platform_intrinsics)] diff --git a/src/test/ui/simd-intrinsic/simd-intrinsic-generic-arithmetic-saturating.stderr b/src/test/ui/simd-intrinsic/simd-intrinsic-generic-arithmetic-saturating.stderr index 0e88540bcc8..1ed472a485d 100644 --- a/src/test/ui/simd-intrinsic/simd-intrinsic-generic-arithmetic-saturating.stderr +++ b/src/test/ui/simd-intrinsic/simd-intrinsic-generic-arithmetic-saturating.stderr @@ -1,11 +1,11 @@ error[E0511]: invalid monomorphization of `simd_saturating_add` intrinsic: expected element type `f32` of vector type `f32x4` to be a signed or unsigned integer type - --> $DIR/simd-intrinsic-generic-arithmetic-saturating.rs:33:9 + --> $DIR/simd-intrinsic-generic-arithmetic-saturating.rs:34:9 | LL | simd_saturating_add(z, z); | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_saturating_sub` intrinsic: expected element type `f32` of vector type `f32x4` to be a signed or unsigned integer type - --> $DIR/simd-intrinsic-generic-arithmetic-saturating.rs:35:9 + --> $DIR/simd-intrinsic-generic-arithmetic-saturating.rs:36:9 | LL | simd_saturating_sub(z, z); | ^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/simd-intrinsic/simd-intrinsic-generic-arithmetic.rs b/src/test/ui/simd-intrinsic/simd-intrinsic-generic-arithmetic.rs index 7686b389a71..f95f548fee8 100644 --- a/src/test/ui/simd-intrinsic/simd-intrinsic-generic-arithmetic.rs +++ b/src/test/ui/simd-intrinsic/simd-intrinsic-generic-arithmetic.rs @@ -1,3 +1,5 @@ +// build-fail + #![feature(repr_simd, platform_intrinsics)] #![allow(non_camel_case_types)] #[repr(simd)] diff --git a/src/test/ui/simd-intrinsic/simd-intrinsic-generic-arithmetic.stderr b/src/test/ui/simd-intrinsic/simd-intrinsic-generic-arithmetic.stderr index 27493950af0..70cdc34684d 100644 --- a/src/test/ui/simd-intrinsic/simd-intrinsic-generic-arithmetic.stderr +++ b/src/test/ui/simd-intrinsic/simd-intrinsic-generic-arithmetic.stderr @@ -1,83 +1,83 @@ error[E0511]: invalid monomorphization of `simd_add` intrinsic: expected SIMD input type, found non-SIMD `i32` - --> $DIR/simd-intrinsic-generic-arithmetic.rs:62:9 + --> $DIR/simd-intrinsic-generic-arithmetic.rs:64:9 | LL | simd_add(0, 0); | ^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_sub` intrinsic: expected SIMD input type, found non-SIMD `i32` - --> $DIR/simd-intrinsic-generic-arithmetic.rs:64:9 + --> $DIR/simd-intrinsic-generic-arithmetic.rs:66:9 | LL | simd_sub(0, 0); | ^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_mul` intrinsic: expected SIMD input type, found non-SIMD `i32` - --> $DIR/simd-intrinsic-generic-arithmetic.rs:66:9 + --> $DIR/simd-intrinsic-generic-arithmetic.rs:68:9 | LL | simd_mul(0, 0); | ^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_div` intrinsic: expected SIMD input type, found non-SIMD `i32` - --> $DIR/simd-intrinsic-generic-arithmetic.rs:68:9 + --> $DIR/simd-intrinsic-generic-arithmetic.rs:70:9 | LL | simd_div(0, 0); | ^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_shl` intrinsic: expected SIMD input type, found non-SIMD `i32` - --> $DIR/simd-intrinsic-generic-arithmetic.rs:70:9 + --> $DIR/simd-intrinsic-generic-arithmetic.rs:72:9 | LL | simd_shl(0, 0); | ^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_shr` intrinsic: expected SIMD input type, found non-SIMD `i32` - --> $DIR/simd-intrinsic-generic-arithmetic.rs:72:9 + --> $DIR/simd-intrinsic-generic-arithmetic.rs:74:9 | LL | simd_shr(0, 0); | ^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_and` intrinsic: expected SIMD input type, found non-SIMD `i32` - --> $DIR/simd-intrinsic-generic-arithmetic.rs:74:9 + --> $DIR/simd-intrinsic-generic-arithmetic.rs:76:9 | LL | simd_and(0, 0); | ^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_or` intrinsic: expected SIMD input type, found non-SIMD `i32` - --> $DIR/simd-intrinsic-generic-arithmetic.rs:76:9 + --> $DIR/simd-intrinsic-generic-arithmetic.rs:78:9 | LL | simd_or(0, 0); | ^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_xor` intrinsic: expected SIMD input type, found non-SIMD `i32` - --> $DIR/simd-intrinsic-generic-arithmetic.rs:78:9 + --> $DIR/simd-intrinsic-generic-arithmetic.rs:80:9 | LL | simd_xor(0, 0); | ^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_shl` intrinsic: unsupported operation on `f32x4` with element `f32` - --> $DIR/simd-intrinsic-generic-arithmetic.rs:82:9 + --> $DIR/simd-intrinsic-generic-arithmetic.rs:84:9 | LL | simd_shl(z, z); | ^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_shr` intrinsic: unsupported operation on `f32x4` with element `f32` - --> $DIR/simd-intrinsic-generic-arithmetic.rs:84:9 + --> $DIR/simd-intrinsic-generic-arithmetic.rs:86:9 | LL | simd_shr(z, z); | ^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_and` intrinsic: unsupported operation on `f32x4` with element `f32` - --> $DIR/simd-intrinsic-generic-arithmetic.rs:86:9 + --> $DIR/simd-intrinsic-generic-arithmetic.rs:88:9 | LL | simd_and(z, z); | ^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_or` intrinsic: unsupported operation on `f32x4` with element `f32` - --> $DIR/simd-intrinsic-generic-arithmetic.rs:88:9 + --> $DIR/simd-intrinsic-generic-arithmetic.rs:90:9 | LL | simd_or(z, z); | ^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_xor` intrinsic: unsupported operation on `f32x4` with element `f32` - --> $DIR/simd-intrinsic-generic-arithmetic.rs:90:9 + --> $DIR/simd-intrinsic-generic-arithmetic.rs:92:9 | LL | simd_xor(z, z); | ^^^^^^^^^^^^^^ diff --git a/src/test/ui/simd-intrinsic/simd-intrinsic-generic-bitmask.rs b/src/test/ui/simd-intrinsic/simd-intrinsic-generic-bitmask.rs index 931ee9db1fe..ed267d8411a 100644 --- a/src/test/ui/simd-intrinsic/simd-intrinsic-generic-bitmask.rs +++ b/src/test/ui/simd-intrinsic/simd-intrinsic-generic-bitmask.rs @@ -1,3 +1,5 @@ +// build-fail + // Test that the simd_bitmask intrinsic produces ok-ish error // messages when misused. diff --git a/src/test/ui/simd-intrinsic/simd-intrinsic-generic-bitmask.stderr b/src/test/ui/simd-intrinsic/simd-intrinsic-generic-bitmask.stderr index d016838d098..8cb235b778b 100644 --- a/src/test/ui/simd-intrinsic/simd-intrinsic-generic-bitmask.stderr +++ b/src/test/ui/simd-intrinsic/simd-intrinsic-generic-bitmask.stderr @@ -1,29 +1,29 @@ error[E0511]: invalid monomorphization of `simd_bitmask` intrinsic: bitmask `u16`, expected `u8` - --> $DIR/simd-intrinsic-generic-bitmask.rs:74:22 + --> $DIR/simd-intrinsic-generic-bitmask.rs:76:22 | LL | let _: u16 = simd_bitmask(m2); | ^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_bitmask` intrinsic: bitmask `u16`, expected `u8` - --> $DIR/simd-intrinsic-generic-bitmask.rs:77:22 + --> $DIR/simd-intrinsic-generic-bitmask.rs:79:22 | LL | let _: u16 = simd_bitmask(m8); | ^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_bitmask` intrinsic: bitmask `u32`, expected `u16` - --> $DIR/simd-intrinsic-generic-bitmask.rs:80:22 + --> $DIR/simd-intrinsic-generic-bitmask.rs:82:22 | LL | let _: u32 = simd_bitmask(m16); | ^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_bitmask` intrinsic: bitmask `u64`, expected `u32` - --> $DIR/simd-intrinsic-generic-bitmask.rs:83:22 + --> $DIR/simd-intrinsic-generic-bitmask.rs:85:22 | LL | let _: u64 = simd_bitmask(m32); | ^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_bitmask` intrinsic: bitmask `u128`, expected `u64` - --> $DIR/simd-intrinsic-generic-bitmask.rs:86:23 + --> $DIR/simd-intrinsic-generic-bitmask.rs:88:23 | LL | let _: u128 = simd_bitmask(m64); | ^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/simd-intrinsic/simd-intrinsic-generic-cast.rs b/src/test/ui/simd-intrinsic/simd-intrinsic-generic-cast.rs index c4016e75b14..4f4fa06b002 100644 --- a/src/test/ui/simd-intrinsic/simd-intrinsic-generic-cast.rs +++ b/src/test/ui/simd-intrinsic/simd-intrinsic-generic-cast.rs @@ -1,3 +1,5 @@ +// build-fail + #![feature(repr_simd, platform_intrinsics)] #[repr(simd)] diff --git a/src/test/ui/simd-intrinsic/simd-intrinsic-generic-cast.stderr b/src/test/ui/simd-intrinsic/simd-intrinsic-generic-cast.stderr index 6e33e3b30f5..d794a742b4d 100644 --- a/src/test/ui/simd-intrinsic/simd-intrinsic-generic-cast.stderr +++ b/src/test/ui/simd-intrinsic/simd-intrinsic-generic-cast.stderr @@ -1,23 +1,23 @@ error[E0511]: invalid monomorphization of `simd_cast` intrinsic: expected SIMD input type, found non-SIMD `i32` - --> $DIR/simd-intrinsic-generic-cast.rs:32:9 + --> $DIR/simd-intrinsic-generic-cast.rs:34:9 | LL | simd_cast::(0); | ^^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_cast` intrinsic: expected SIMD input type, found non-SIMD `i32` - --> $DIR/simd-intrinsic-generic-cast.rs:34:9 + --> $DIR/simd-intrinsic-generic-cast.rs:36:9 | LL | simd_cast::(0); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_cast` intrinsic: expected SIMD return type, found non-SIMD `i32` - --> $DIR/simd-intrinsic-generic-cast.rs:36:9 + --> $DIR/simd-intrinsic-generic-cast.rs:38:9 | LL | simd_cast::(x); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_cast` intrinsic: expected return type with length 4 (same as input type `i32x4`), found `i32x8` with length 8 - --> $DIR/simd-intrinsic-generic-cast.rs:38:9 + --> $DIR/simd-intrinsic-generic-cast.rs:40:9 | LL | simd_cast::<_, i32x8>(x); | ^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/simd-intrinsic/simd-intrinsic-generic-comparison.rs b/src/test/ui/simd-intrinsic/simd-intrinsic-generic-comparison.rs index 3ac47d17dad..3cd38042f0f 100644 --- a/src/test/ui/simd-intrinsic/simd-intrinsic-generic-comparison.rs +++ b/src/test/ui/simd-intrinsic/simd-intrinsic-generic-comparison.rs @@ -1,3 +1,5 @@ +// build-fail + #![feature(repr_simd, platform_intrinsics)] #[repr(simd)] diff --git a/src/test/ui/simd-intrinsic/simd-intrinsic-generic-comparison.stderr b/src/test/ui/simd-intrinsic/simd-intrinsic-generic-comparison.stderr index d8da2e5ee57..36c6b934d58 100644 --- a/src/test/ui/simd-intrinsic/simd-intrinsic-generic-comparison.stderr +++ b/src/test/ui/simd-intrinsic/simd-intrinsic-generic-comparison.stderr @@ -1,107 +1,107 @@ error[E0511]: invalid monomorphization of `simd_eq` intrinsic: expected SIMD input type, found non-SIMD `i32` - --> $DIR/simd-intrinsic-generic-comparison.rs:26:9 + --> $DIR/simd-intrinsic-generic-comparison.rs:28:9 | LL | simd_eq::(0, 0); | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_ne` intrinsic: expected SIMD input type, found non-SIMD `i32` - --> $DIR/simd-intrinsic-generic-comparison.rs:28:9 + --> $DIR/simd-intrinsic-generic-comparison.rs:30:9 | LL | simd_ne::(0, 0); | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_lt` intrinsic: expected SIMD input type, found non-SIMD `i32` - --> $DIR/simd-intrinsic-generic-comparison.rs:30:9 + --> $DIR/simd-intrinsic-generic-comparison.rs:32:9 | LL | simd_lt::(0, 0); | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_le` intrinsic: expected SIMD input type, found non-SIMD `i32` - --> $DIR/simd-intrinsic-generic-comparison.rs:32:9 + --> $DIR/simd-intrinsic-generic-comparison.rs:34:9 | LL | simd_le::(0, 0); | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_gt` intrinsic: expected SIMD input type, found non-SIMD `i32` - --> $DIR/simd-intrinsic-generic-comparison.rs:34:9 + --> $DIR/simd-intrinsic-generic-comparison.rs:36:9 | LL | simd_gt::(0, 0); | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_ge` intrinsic: expected SIMD input type, found non-SIMD `i32` - --> $DIR/simd-intrinsic-generic-comparison.rs:36:9 + --> $DIR/simd-intrinsic-generic-comparison.rs:38:9 | LL | simd_ge::(0, 0); | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_eq` intrinsic: expected SIMD return type, found non-SIMD `i32` - --> $DIR/simd-intrinsic-generic-comparison.rs:39:9 + --> $DIR/simd-intrinsic-generic-comparison.rs:41:9 | LL | simd_eq::<_, i32>(x, x); | ^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_ne` intrinsic: expected SIMD return type, found non-SIMD `i32` - --> $DIR/simd-intrinsic-generic-comparison.rs:41:9 + --> $DIR/simd-intrinsic-generic-comparison.rs:43:9 | LL | simd_ne::<_, i32>(x, x); | ^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_lt` intrinsic: expected SIMD return type, found non-SIMD `i32` - --> $DIR/simd-intrinsic-generic-comparison.rs:43:9 + --> $DIR/simd-intrinsic-generic-comparison.rs:45:9 | LL | simd_lt::<_, i32>(x, x); | ^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_le` intrinsic: expected SIMD return type, found non-SIMD `i32` - --> $DIR/simd-intrinsic-generic-comparison.rs:45:9 + --> $DIR/simd-intrinsic-generic-comparison.rs:47:9 | LL | simd_le::<_, i32>(x, x); | ^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_gt` intrinsic: expected SIMD return type, found non-SIMD `i32` - --> $DIR/simd-intrinsic-generic-comparison.rs:47:9 + --> $DIR/simd-intrinsic-generic-comparison.rs:49:9 | LL | simd_gt::<_, i32>(x, x); | ^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_ge` intrinsic: expected SIMD return type, found non-SIMD `i32` - --> $DIR/simd-intrinsic-generic-comparison.rs:49:9 + --> $DIR/simd-intrinsic-generic-comparison.rs:51:9 | LL | simd_ge::<_, i32>(x, x); | ^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_eq` intrinsic: expected return type with length 4 (same as input type `i32x4`), found `i16x8` with length 8 - --> $DIR/simd-intrinsic-generic-comparison.rs:52:9 + --> $DIR/simd-intrinsic-generic-comparison.rs:54:9 | LL | simd_eq::<_, i16x8>(x, x); | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_ne` intrinsic: expected return type with length 4 (same as input type `i32x4`), found `i16x8` with length 8 - --> $DIR/simd-intrinsic-generic-comparison.rs:54:9 + --> $DIR/simd-intrinsic-generic-comparison.rs:56:9 | LL | simd_ne::<_, i16x8>(x, x); | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_lt` intrinsic: expected return type with length 4 (same as input type `i32x4`), found `i16x8` with length 8 - --> $DIR/simd-intrinsic-generic-comparison.rs:56:9 + --> $DIR/simd-intrinsic-generic-comparison.rs:58:9 | LL | simd_lt::<_, i16x8>(x, x); | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_le` intrinsic: expected return type with length 4 (same as input type `i32x4`), found `i16x8` with length 8 - --> $DIR/simd-intrinsic-generic-comparison.rs:58:9 + --> $DIR/simd-intrinsic-generic-comparison.rs:60:9 | LL | simd_le::<_, i16x8>(x, x); | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_gt` intrinsic: expected return type with length 4 (same as input type `i32x4`), found `i16x8` with length 8 - --> $DIR/simd-intrinsic-generic-comparison.rs:60:9 + --> $DIR/simd-intrinsic-generic-comparison.rs:62:9 | LL | simd_gt::<_, i16x8>(x, x); | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_ge` intrinsic: expected return type with length 4 (same as input type `i32x4`), found `i16x8` with length 8 - --> $DIR/simd-intrinsic-generic-comparison.rs:62:9 + --> $DIR/simd-intrinsic-generic-comparison.rs:64:9 | LL | simd_ge::<_, i16x8>(x, x); | ^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/simd-intrinsic/simd-intrinsic-generic-elements.rs b/src/test/ui/simd-intrinsic/simd-intrinsic-generic-elements.rs index 28fcb6c57ec..5929d05f4de 100644 --- a/src/test/ui/simd-intrinsic/simd-intrinsic-generic-elements.rs +++ b/src/test/ui/simd-intrinsic/simd-intrinsic-generic-elements.rs @@ -1,3 +1,5 @@ +// build-fail + #![feature(repr_simd, platform_intrinsics, rustc_attrs)] #[repr(simd)] diff --git a/src/test/ui/simd-intrinsic/simd-intrinsic-generic-elements.stderr b/src/test/ui/simd-intrinsic/simd-intrinsic-generic-elements.stderr index 2f8ffb6035e..78022c0c8bd 100644 --- a/src/test/ui/simd-intrinsic/simd-intrinsic-generic-elements.stderr +++ b/src/test/ui/simd-intrinsic/simd-intrinsic-generic-elements.stderr @@ -1,89 +1,89 @@ error[E0511]: invalid monomorphization of `simd_insert` intrinsic: expected SIMD input type, found non-SIMD `i32` - --> $DIR/simd-intrinsic-generic-elements.rs:53:9 + --> $DIR/simd-intrinsic-generic-elements.rs:55:9 | LL | simd_insert(0, 0, 0); | ^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_insert` intrinsic: expected inserted type `i32` (element of input `i32x4`), found `f64` - --> $DIR/simd-intrinsic-generic-elements.rs:55:9 + --> $DIR/simd-intrinsic-generic-elements.rs:57:9 | LL | simd_insert(x, 0, 1.0); | ^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_extract` intrinsic: expected return type `i32` (element of input `i32x4`), found `f32` - --> $DIR/simd-intrinsic-generic-elements.rs:57:9 + --> $DIR/simd-intrinsic-generic-elements.rs:59:9 | LL | simd_extract::<_, f32>(x, 0); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_shuffle2` intrinsic: expected SIMD input type, found non-SIMD `i32` - --> $DIR/simd-intrinsic-generic-elements.rs:60:9 + --> $DIR/simd-intrinsic-generic-elements.rs:62:9 | LL | simd_shuffle2::(0, 0, [0; 2]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_shuffle3` intrinsic: expected SIMD input type, found non-SIMD `i32` - --> $DIR/simd-intrinsic-generic-elements.rs:62:9 + --> $DIR/simd-intrinsic-generic-elements.rs:64:9 | LL | simd_shuffle3::(0, 0, [0; 3]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_shuffle4` intrinsic: expected SIMD input type, found non-SIMD `i32` - --> $DIR/simd-intrinsic-generic-elements.rs:64:9 + --> $DIR/simd-intrinsic-generic-elements.rs:66:9 | LL | simd_shuffle4::(0, 0, [0; 4]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_shuffle8` intrinsic: expected SIMD input type, found non-SIMD `i32` - --> $DIR/simd-intrinsic-generic-elements.rs:66:9 + --> $DIR/simd-intrinsic-generic-elements.rs:68:9 | LL | simd_shuffle8::(0, 0, [0; 8]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_shuffle2` intrinsic: expected return element type `i32` (element of input `i32x4`), found `f32x2` with element type `f32` - --> $DIR/simd-intrinsic-generic-elements.rs:69:9 + --> $DIR/simd-intrinsic-generic-elements.rs:71:9 | LL | simd_shuffle2::<_, f32x2>(x, x, [0; 2]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_shuffle3` intrinsic: expected return element type `i32` (element of input `i32x4`), found `f32x3` with element type `f32` - --> $DIR/simd-intrinsic-generic-elements.rs:71:9 + --> $DIR/simd-intrinsic-generic-elements.rs:73:9 | LL | simd_shuffle3::<_, f32x3>(x, x, [0; 3]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_shuffle4` intrinsic: expected return element type `i32` (element of input `i32x4`), found `f32x4` with element type `f32` - --> $DIR/simd-intrinsic-generic-elements.rs:73:9 + --> $DIR/simd-intrinsic-generic-elements.rs:75:9 | LL | simd_shuffle4::<_, f32x4>(x, x, [0; 4]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_shuffle8` intrinsic: expected return element type `i32` (element of input `i32x4`), found `f32x8` with element type `f32` - --> $DIR/simd-intrinsic-generic-elements.rs:75:9 + --> $DIR/simd-intrinsic-generic-elements.rs:77:9 | LL | simd_shuffle8::<_, f32x8>(x, x, [0; 8]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_shuffle2` intrinsic: expected return type of length 2, found `i32x8` with length 8 - --> $DIR/simd-intrinsic-generic-elements.rs:78:9 + --> $DIR/simd-intrinsic-generic-elements.rs:80:9 | LL | simd_shuffle2::<_, i32x8>(x, x, [0; 2]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_shuffle3` intrinsic: expected return type of length 3, found `i32x4` with length 4 - --> $DIR/simd-intrinsic-generic-elements.rs:80:9 + --> $DIR/simd-intrinsic-generic-elements.rs:82:9 | LL | simd_shuffle3::<_, i32x4>(x, x, [0; 3]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_shuffle4` intrinsic: expected return type of length 4, found `i32x3` with length 3 - --> $DIR/simd-intrinsic-generic-elements.rs:82:9 + --> $DIR/simd-intrinsic-generic-elements.rs:84:9 | LL | simd_shuffle4::<_, i32x3>(x, x, [0; 4]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_shuffle8` intrinsic: expected return type of length 8, found `i32x2` with length 2 - --> $DIR/simd-intrinsic-generic-elements.rs:84:9 + --> $DIR/simd-intrinsic-generic-elements.rs:86:9 | LL | simd_shuffle8::<_, i32x2>(x, x, [0; 8]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/simd-intrinsic/simd-intrinsic-generic-reduction.rs b/src/test/ui/simd-intrinsic/simd-intrinsic-generic-reduction.rs index 9a6dbe9d9ab..ede4b26d19c 100644 --- a/src/test/ui/simd-intrinsic/simd-intrinsic-generic-reduction.rs +++ b/src/test/ui/simd-intrinsic/simd-intrinsic-generic-reduction.rs @@ -1,3 +1,4 @@ +// build-fail // ignore-emscripten // Test that the simd_reduce_{op} intrinsics produce ok-ish error diff --git a/src/test/ui/simd-intrinsic/simd-intrinsic-generic-reduction.stderr b/src/test/ui/simd-intrinsic/simd-intrinsic-generic-reduction.stderr index 5f2a67dc14e..91a62f6a1c6 100644 --- a/src/test/ui/simd-intrinsic/simd-intrinsic-generic-reduction.stderr +++ b/src/test/ui/simd-intrinsic/simd-intrinsic-generic-reduction.stderr @@ -1,59 +1,59 @@ error[E0511]: invalid monomorphization of `simd_reduce_add_ordered` intrinsic: expected return type `f32` (element of input `f32x4`), found `i32` - --> $DIR/simd-intrinsic-generic-reduction.rs:33:9 + --> $DIR/simd-intrinsic-generic-reduction.rs:34:9 | LL | simd_reduce_add_ordered(z, 0); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_reduce_mul_ordered` intrinsic: expected return type `f32` (element of input `f32x4`), found `i32` - --> $DIR/simd-intrinsic-generic-reduction.rs:35:9 + --> $DIR/simd-intrinsic-generic-reduction.rs:36:9 | LL | simd_reduce_mul_ordered(z, 1); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_reduce_and` intrinsic: expected return type `u32` (element of input `u32x4`), found `f32` - --> $DIR/simd-intrinsic-generic-reduction.rs:38:22 + --> $DIR/simd-intrinsic-generic-reduction.rs:39:22 | LL | let _: f32 = simd_reduce_and(x); | ^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_reduce_or` intrinsic: expected return type `u32` (element of input `u32x4`), found `f32` - --> $DIR/simd-intrinsic-generic-reduction.rs:40:22 + --> $DIR/simd-intrinsic-generic-reduction.rs:41:22 | LL | let _: f32 = simd_reduce_or(x); | ^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_reduce_xor` intrinsic: expected return type `u32` (element of input `u32x4`), found `f32` - --> $DIR/simd-intrinsic-generic-reduction.rs:42:22 + --> $DIR/simd-intrinsic-generic-reduction.rs:43:22 | LL | let _: f32 = simd_reduce_xor(x); | ^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_reduce_and` intrinsic: unsupported simd_reduce_and from `f32x4` with element `f32` to `f32` - --> $DIR/simd-intrinsic-generic-reduction.rs:45:22 + --> $DIR/simd-intrinsic-generic-reduction.rs:46:22 | LL | let _: f32 = simd_reduce_and(z); | ^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_reduce_or` intrinsic: unsupported simd_reduce_or from `f32x4` with element `f32` to `f32` - --> $DIR/simd-intrinsic-generic-reduction.rs:47:22 + --> $DIR/simd-intrinsic-generic-reduction.rs:48:22 | LL | let _: f32 = simd_reduce_or(z); | ^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_reduce_xor` intrinsic: unsupported simd_reduce_xor from `f32x4` with element `f32` to `f32` - --> $DIR/simd-intrinsic-generic-reduction.rs:49:22 + --> $DIR/simd-intrinsic-generic-reduction.rs:50:22 | LL | let _: f32 = simd_reduce_xor(z); | ^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_reduce_all` intrinsic: unsupported simd_reduce_all from `f32x4` with element `f32` to `bool` - --> $DIR/simd-intrinsic-generic-reduction.rs:52:23 + --> $DIR/simd-intrinsic-generic-reduction.rs:53:23 | LL | let _: bool = simd_reduce_all(z); | ^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_reduce_any` intrinsic: unsupported simd_reduce_any from `f32x4` with element `f32` to `bool` - --> $DIR/simd-intrinsic-generic-reduction.rs:54:23 + --> $DIR/simd-intrinsic-generic-reduction.rs:55:23 | LL | let _: bool = simd_reduce_any(z); | ^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/simd-intrinsic/simd-intrinsic-generic-select.rs b/src/test/ui/simd-intrinsic/simd-intrinsic-generic-select.rs index 72f51a895b6..a719b314150 100644 --- a/src/test/ui/simd-intrinsic/simd-intrinsic-generic-select.rs +++ b/src/test/ui/simd-intrinsic/simd-intrinsic-generic-select.rs @@ -1,3 +1,5 @@ +// build-fail + // Test that the simd_select intrinsic produces ok-ish error // messages when misused. diff --git a/src/test/ui/simd-intrinsic/simd-intrinsic-generic-select.stderr b/src/test/ui/simd-intrinsic/simd-intrinsic-generic-select.stderr index a46352c7308..f68c969d13e 100644 --- a/src/test/ui/simd-intrinsic/simd-intrinsic-generic-select.stderr +++ b/src/test/ui/simd-intrinsic/simd-intrinsic-generic-select.stderr @@ -1,47 +1,47 @@ error[E0511]: invalid monomorphization of `simd_select` intrinsic: mismatched lengths: mask length `8` != other vector length `4` - --> $DIR/simd-intrinsic-generic-select.rs:38:9 + --> $DIR/simd-intrinsic-generic-select.rs:40:9 | LL | simd_select(m8, x, x); | ^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_select` intrinsic: mask element type is `u32`, expected `i_` - --> $DIR/simd-intrinsic-generic-select.rs:41:9 + --> $DIR/simd-intrinsic-generic-select.rs:43:9 | LL | simd_select(x, x, x); | ^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_select` intrinsic: mask element type is `f32`, expected `i_` - --> $DIR/simd-intrinsic-generic-select.rs:44:9 + --> $DIR/simd-intrinsic-generic-select.rs:46:9 | LL | simd_select(z, z, z); | ^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_select` intrinsic: expected SIMD argument type, found non-SIMD `u32` - --> $DIR/simd-intrinsic-generic-select.rs:47:9 + --> $DIR/simd-intrinsic-generic-select.rs:49:9 | LL | simd_select(m4, 0u32, 1u32); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_select_bitmask` intrinsic: mismatched lengths: mask length `8` != other vector length `4` - --> $DIR/simd-intrinsic-generic-select.rs:50:9 + --> $DIR/simd-intrinsic-generic-select.rs:52:9 | LL | simd_select_bitmask(0u8, x, x); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_select_bitmask` intrinsic: expected SIMD argument type, found non-SIMD `u32` - --> $DIR/simd-intrinsic-generic-select.rs:53:9 + --> $DIR/simd-intrinsic-generic-select.rs:55:9 | LL | simd_select_bitmask(0u8, 1u32, 2u32); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_select_bitmask` intrinsic: `f32` is not an integral type - --> $DIR/simd-intrinsic-generic-select.rs:56:9 + --> $DIR/simd-intrinsic-generic-select.rs:58:9 | LL | simd_select_bitmask(0.0f32, x, x); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0511]: invalid monomorphization of `simd_select_bitmask` intrinsic: `&str` is not an integral type - --> $DIR/simd-intrinsic-generic-select.rs:59:9 + --> $DIR/simd-intrinsic-generic-select.rs:61:9 | LL | simd_select_bitmask("x", x, x); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/simd-type-generic-monomorphisation.rs b/src/test/ui/simd-type-generic-monomorphisation.rs index 68eb78759eb..fc5e23f4986 100644 --- a/src/test/ui/simd-type-generic-monomorphisation.rs +++ b/src/test/ui/simd-type-generic-monomorphisation.rs @@ -1,3 +1,5 @@ +// build-fail + #![feature(repr_simd, platform_intrinsics)] // error-pattern:monomorphising SIMD type `Simd2` with a non-machine element type `X` diff --git a/src/test/ui/symbol-names/basic.legacy.stderr b/src/test/ui/symbol-names/basic.legacy.stderr index 52e777285eb..895ff5ae54f 100644 --- a/src/test/ui/symbol-names/basic.legacy.stderr +++ b/src/test/ui/symbol-names/basic.legacy.stderr @@ -1,23 +1,23 @@ error: symbol-name(_ZN5basic4main17h81759b0695851718E) - --> $DIR/basic.rs:7:1 + --> $DIR/basic.rs:8:1 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ error: demangling(basic::main::h81759b0695851718) - --> $DIR/basic.rs:7:1 + --> $DIR/basic.rs:8:1 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ error: demangling-alt(basic::main) - --> $DIR/basic.rs:7:1 + --> $DIR/basic.rs:8:1 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ error: def-path(main) - --> $DIR/basic.rs:14:1 + --> $DIR/basic.rs:15:1 | LL | #[rustc_def_path] | ^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/symbol-names/basic.rs b/src/test/ui/symbol-names/basic.rs index aa88184eddf..ddc349d7f10 100644 --- a/src/test/ui/symbol-names/basic.rs +++ b/src/test/ui/symbol-names/basic.rs @@ -1,3 +1,4 @@ +// build-fail // revisions: legacy v0 //[legacy]compile-flags: -Z symbol-mangling-version=legacy //[v0]compile-flags: -Z symbol-mangling-version=v0 diff --git a/src/test/ui/symbol-names/basic.v0.stderr b/src/test/ui/symbol-names/basic.v0.stderr index 40a39daaedc..36dba0dfc97 100644 --- a/src/test/ui/symbol-names/basic.v0.stderr +++ b/src/test/ui/symbol-names/basic.v0.stderr @@ -1,23 +1,23 @@ error: symbol-name(_RNvCs4fqI2P2rA04_5basic4main) - --> $DIR/basic.rs:7:1 + --> $DIR/basic.rs:8:1 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ error: demangling(basic[317d481089b8c8fe]::main) - --> $DIR/basic.rs:7:1 + --> $DIR/basic.rs:8:1 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ error: demangling-alt(basic::main) - --> $DIR/basic.rs:7:1 + --> $DIR/basic.rs:8:1 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ error: def-path(main) - --> $DIR/basic.rs:14:1 + --> $DIR/basic.rs:15:1 | LL | #[rustc_def_path] | ^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/symbol-names/impl1.legacy.stderr b/src/test/ui/symbol-names/impl1.legacy.stderr index c9495b597eb..53ab2f9878f 100644 --- a/src/test/ui/symbol-names/impl1.legacy.stderr +++ b/src/test/ui/symbol-names/impl1.legacy.stderr @@ -1,71 +1,71 @@ error: symbol-name(_ZN5impl13foo3Foo3bar17h92cf46db76791039E) - --> $DIR/impl1.rs:13:9 + --> $DIR/impl1.rs:14:9 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ error: demangling(impl1::foo::Foo::bar::h92cf46db76791039) - --> $DIR/impl1.rs:13:9 + --> $DIR/impl1.rs:14:9 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ error: demangling-alt(impl1::foo::Foo::bar) - --> $DIR/impl1.rs:13:9 + --> $DIR/impl1.rs:14:9 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ error: def-path(foo::Foo::bar) - --> $DIR/impl1.rs:20:9 + --> $DIR/impl1.rs:21:9 | LL | #[rustc_def_path] | ^^^^^^^^^^^^^^^^^ error: symbol-name(_ZN5impl13bar33_$LT$impl$u20$impl1..foo..Foo$GT$3baz17h90c4a800b1aa0df0E) - --> $DIR/impl1.rs:31:9 + --> $DIR/impl1.rs:32:9 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ error: demangling(impl1::bar::::baz::h90c4a800b1aa0df0) - --> $DIR/impl1.rs:31:9 + --> $DIR/impl1.rs:32:9 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ error: demangling-alt(impl1::bar::::baz) - --> $DIR/impl1.rs:31:9 + --> $DIR/impl1.rs:32:9 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ error: def-path(bar::::baz) - --> $DIR/impl1.rs:38:9 + --> $DIR/impl1.rs:39:9 | LL | #[rustc_def_path] | ^^^^^^^^^^^^^^^^^ error: symbol-name(_ZN209_$LT$$u5b$$RF$dyn$u20$impl1..Foo$u2b$Assoc$u20$$u3d$$u20$extern$u20$$u22$C$u22$$u20$fn$LP$$RF$u8$C$$u20$...$RP$$u2b$impl1..AutoTrait$u3b$$u20$_$u5d$$u20$as$u20$impl1..main..$u7b$$u7b$closure$u7d$$u7d$..Bar$GT$6method17h92c563325b7ff21aE) - --> $DIR/impl1.rs:61:13 + --> $DIR/impl1.rs:62:13 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ error: demangling(<[&dyn impl1::Foo+Assoc = extern "C" fn(&u8, ::.)+impl1::AutoTrait; _] as impl1::main::{{closure}}::Bar>::method::h92c563325b7ff21a) - --> $DIR/impl1.rs:61:13 + --> $DIR/impl1.rs:62:13 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ error: demangling-alt(<[&dyn impl1::Foo+Assoc = extern "C" fn(&u8, ::.)+impl1::AutoTrait; _] as impl1::main::{{closure}}::Bar>::method) - --> $DIR/impl1.rs:61:13 + --> $DIR/impl1.rs:62:13 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ error: def-path(<[&dyn Foo extern "C" fn(&'r u8, ...)> + AutoTrait; _] as main::{{closure}}#1::Bar>::method) - --> $DIR/impl1.rs:68:13 + --> $DIR/impl1.rs:69:13 | LL | #[rustc_def_path] | ^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/symbol-names/impl1.rs b/src/test/ui/symbol-names/impl1.rs index add0d10ea6c..c1aaec5169d 100644 --- a/src/test/ui/symbol-names/impl1.rs +++ b/src/test/ui/symbol-names/impl1.rs @@ -1,3 +1,4 @@ +// build-fail // ignore-tidy-linelength // revisions: legacy v0 //[legacy]compile-flags: -Z symbol-mangling-version=legacy diff --git a/src/test/ui/symbol-names/impl1.v0.stderr b/src/test/ui/symbol-names/impl1.v0.stderr index 01fe39ddf6c..a931937d1a8 100644 --- a/src/test/ui/symbol-names/impl1.v0.stderr +++ b/src/test/ui/symbol-names/impl1.v0.stderr @@ -1,71 +1,71 @@ error: symbol-name(_RNvMNtCs4fqI2P2rA04_5impl13fooNtB2_3Foo3bar) - --> $DIR/impl1.rs:13:9 + --> $DIR/impl1.rs:14:9 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ error: demangling(::bar) - --> $DIR/impl1.rs:13:9 + --> $DIR/impl1.rs:14:9 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ error: demangling-alt(::bar) - --> $DIR/impl1.rs:13:9 + --> $DIR/impl1.rs:14:9 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ error: def-path(foo::Foo::bar) - --> $DIR/impl1.rs:20:9 + --> $DIR/impl1.rs:21:9 | LL | #[rustc_def_path] | ^^^^^^^^^^^^^^^^^ error: symbol-name(_RNvMNtCs4fqI2P2rA04_5impl13barNtNtB4_3foo3Foo3baz) - --> $DIR/impl1.rs:31:9 + --> $DIR/impl1.rs:32:9 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ error: demangling(::baz) - --> $DIR/impl1.rs:31:9 + --> $DIR/impl1.rs:32:9 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ error: demangling-alt(::baz) - --> $DIR/impl1.rs:31:9 + --> $DIR/impl1.rs:32:9 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ error: def-path(bar::::baz) - --> $DIR/impl1.rs:38:9 + --> $DIR/impl1.rs:39:9 | LL | #[rustc_def_path] | ^^^^^^^^^^^^^^^^^ error: symbol-name(_RNvXNCNvCs4fqI2P2rA04_5impl14mains_0ARDNtB6_3Foop5AssocFG_KCRL0_hvEuNtB6_9AutoTraitEL_j3_NtB2_3Bar6method) - --> $DIR/impl1.rs:61:13 + --> $DIR/impl1.rs:62:13 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ error: demangling(<[&dyn impl1[317d481089b8c8fe]::Foo extern "C" fn(&'a u8, ...)> + impl1[317d481089b8c8fe]::AutoTrait; 3: usize] as impl1[317d481089b8c8fe]::main::{closure#1}::Bar>::method) - --> $DIR/impl1.rs:61:13 + --> $DIR/impl1.rs:62:13 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ error: demangling-alt(<[&dyn impl1::Foo extern "C" fn(&'a u8, ...)> + impl1::AutoTrait; 3] as impl1::main::{closure#1}::Bar>::method) - --> $DIR/impl1.rs:61:13 + --> $DIR/impl1.rs:62:13 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ error: def-path(<[&dyn Foo extern "C" fn(&'r u8, ...)> + AutoTrait; _] as main::{{closure}}#1::Bar>::method) - --> $DIR/impl1.rs:68:13 + --> $DIR/impl1.rs:69:13 | LL | #[rustc_def_path] | ^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/symbol-names/impl2.rs b/src/test/ui/symbol-names/impl2.rs index d48b182f2a2..08add29cb9c 100644 --- a/src/test/ui/symbol-names/impl2.rs +++ b/src/test/ui/symbol-names/impl2.rs @@ -1,3 +1,5 @@ +// build-fail + #![feature(rustc_attrs)] #![allow(dead_code)] diff --git a/src/test/ui/symbol-names/impl2.stderr b/src/test/ui/symbol-names/impl2.stderr index de26fed4413..98330031602 100644 --- a/src/test/ui/symbol-names/impl2.stderr +++ b/src/test/ui/symbol-names/impl2.stderr @@ -1,5 +1,5 @@ error: def-path(<[u8; _] as Foo>::baz) - --> $DIR/impl2.rs:9:5 + --> $DIR/impl2.rs:11:5 | LL | #[rustc_def_path] | ^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/symbol-names/issue-60925.legacy.stderr b/src/test/ui/symbol-names/issue-60925.legacy.stderr index 19d9740fb16..0e3a34adbc7 100644 --- a/src/test/ui/symbol-names/issue-60925.legacy.stderr +++ b/src/test/ui/symbol-names/issue-60925.legacy.stderr @@ -1,17 +1,17 @@ error: symbol-name(_ZN11issue_609253foo37Foo$LT$issue_60925..llv$u6d$..Foo$GT$3foo17hc86312d25b60f6eeE) - --> $DIR/issue-60925.rs:21:9 + --> $DIR/issue-60925.rs:22:9 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ error: demangling(issue_60925::foo::Foo::foo::hc86312d25b60f6ee) - --> $DIR/issue-60925.rs:21:9 + --> $DIR/issue-60925.rs:22:9 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ error: demangling-alt(issue_60925::foo::Foo::foo) - --> $DIR/issue-60925.rs:21:9 + --> $DIR/issue-60925.rs:22:9 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/symbol-names/issue-60925.rs b/src/test/ui/symbol-names/issue-60925.rs index 02438351dbc..55b7041935c 100644 --- a/src/test/ui/symbol-names/issue-60925.rs +++ b/src/test/ui/symbol-names/issue-60925.rs @@ -1,3 +1,4 @@ +// build-fail // ignore-tidy-linelength // revisions: legacy v0 //[legacy]compile-flags: -Z symbol-mangling-version=legacy diff --git a/src/test/ui/symbol-names/issue-60925.v0.stderr b/src/test/ui/symbol-names/issue-60925.v0.stderr index 5ead40211d2..78594b88b45 100644 --- a/src/test/ui/symbol-names/issue-60925.v0.stderr +++ b/src/test/ui/symbol-names/issue-60925.v0.stderr @@ -1,17 +1,17 @@ error: symbol-name(_RNvMNtCs4fqI2P2rA04_11issue_609253fooINtB2_3FooNtNtB4_4llvm3FooE3foo) - --> $DIR/issue-60925.rs:21:9 + --> $DIR/issue-60925.rs:22:9 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ error: demangling(>::foo) - --> $DIR/issue-60925.rs:21:9 + --> $DIR/issue-60925.rs:22:9 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ error: demangling-alt(>::foo) - --> $DIR/issue-60925.rs:21:9 + --> $DIR/issue-60925.rs:22:9 | LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/type_length_limit.rs b/src/test/ui/type_length_limit.rs index 926f12911c5..2f12c041a64 100644 --- a/src/test/ui/type_length_limit.rs +++ b/src/test/ui/type_length_limit.rs @@ -1,3 +1,4 @@ +// build-fail // ignore-x86 FIXME: missing sysroot spans (#53081) // error-pattern: reached the type-length limit while instantiating diff --git a/src/tools/compiletest/src/common.rs b/src/tools/compiletest/src/common.rs index 2358a065d62..09733ffbe6a 100644 --- a/src/tools/compiletest/src/common.rs +++ b/src/tools/compiletest/src/common.rs @@ -100,7 +100,6 @@ pub enum PassMode { Check, Build, Run, - RunFail, } impl FromStr for PassMode { @@ -121,12 +120,18 @@ impl fmt::Display for PassMode { PassMode::Check => "check", PassMode::Build => "build", PassMode::Run => "run", - PassMode::RunFail => "run-fail", }; fmt::Display::fmt(s, f) } } +#[derive(Copy, Clone, Debug, PartialEq, PartialOrd)] +pub enum FailMode { + Check, + Build, + Run, +} + #[derive(Clone, Debug, PartialEq)] pub enum CompareMode { Nll, diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs index 93586060438..7c90871f5ab 100644 --- a/src/tools/compiletest/src/header.rs +++ b/src/tools/compiletest/src/header.rs @@ -6,7 +6,7 @@ use std::path::{Path, PathBuf}; use log::*; -use crate::common::{self, CompareMode, Config, Mode, PassMode}; +use crate::common::{self, CompareMode, Config, Mode, PassMode, FailMode}; use crate::util; use crate::extract_gdb_version; @@ -366,6 +366,8 @@ pub struct TestProps { pass_mode: Option, // Ignore `--pass` overrides from the command line for this test. ignore_pass: bool, + // How far this test should proceed while still failing. + pub fail_mode: Option, // rustdoc will test the output of the `--test` option pub check_test_line_numbers_match: bool, // Do not pass `-Z ui-testing` to UI tests @@ -411,6 +413,7 @@ impl TestProps { forbid_output: vec![], incremental_dir: None, pass_mode: None, + fail_mode: None, ignore_pass: false, check_test_line_numbers_match: false, disable_ui_testing_normalization: false, @@ -437,6 +440,13 @@ impl TestProps { pub fn from_file(testfile: &Path, cfg: Option<&str>, config: &Config) -> Self { let mut props = TestProps::new(); props.load_from(testfile, cfg, config); + + match (props.pass_mode, props.fail_mode) { + (None, None) => props.fail_mode = Some(FailMode::Check), + (Some(_), None) | (None, Some(_)) => {} + (Some(_), Some(_)) => panic!("cannot use a *-fail and *-pass mode together"), + } + props } @@ -548,6 +558,7 @@ impl TestProps { } self.update_pass_mode(ln, cfg, config); + self.update_fail_mode(ln, config); if !self.ignore_pass { self.ignore_pass = config.parse_ignore_pass(ln); @@ -602,6 +613,29 @@ impl TestProps { } } + fn update_fail_mode(&mut self, ln: &str, config: &Config) { + let check_ui = |mode: &str| if config.mode != Mode::Ui { + panic!("`{}-fail` header is only supported in UI tests", mode); + }; + let fail_mode = if config.parse_name_directive(ln, "check-fail") { + check_ui("check"); + Some(FailMode::Check) + } else if config.parse_name_directive(ln, "build-fail") { + check_ui("build"); + Some(FailMode::Build) + } else if config.parse_name_directive(ln, "run-fail") { + check_ui("run"); + Some(FailMode::Run) + } else { + None + }; + match (self.fail_mode, fail_mode) { + (None, Some(_)) => self.fail_mode = fail_mode, + (Some(_), Some(_)) => panic!("multiple `*-fail` headers in a single test"), + (_, None) => {} + } + } + fn update_pass_mode(&mut self, ln: &str, revision: Option<&str>, config: &Config) { let check_no_run = |s| { if config.mode != Mode::Ui && config.mode != Mode::Incremental { @@ -624,11 +658,6 @@ impl TestProps { panic!("`run-pass` header is only supported in UI tests") } Some(PassMode::Run) - } else if config.parse_name_directive(ln, "run-fail") { - if config.mode != Mode::Ui { - panic!("`run-fail` header is only supported in UI tests") - } - Some(PassMode::RunFail) } else { None }; @@ -640,13 +669,9 @@ impl TestProps { } pub fn pass_mode(&self, config: &Config) -> Option { - if !self.ignore_pass { - if let (mode @ Some(_), Some(pm_file)) = (config.force_pass_mode, self.pass_mode) { - if pm_file != PassMode::RunFail { - // HACK(Centril): See #66929. Ensure that `--pass check` - // does not cause `// run-fail` tests to fail. - return mode; - } + if !self.ignore_pass && self.fail_mode.is_none() && config.mode == Mode::Ui { + if let (mode @ Some(_), Some(_)) = (config.force_pass_mode, self.pass_mode) { + return mode; } } self.pass_mode diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index 480868440b8..f9b4b942d48 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -1,6 +1,6 @@ // ignore-tidy-filelength -use crate::common::{CompareMode, PassMode}; +use crate::common::{CompareMode, PassMode, FailMode}; use crate::common::{expected_output_path, UI_EXTENSIONS, UI_FIXED, UI_STDERR, UI_STDOUT}; use crate::common::{UI_RUN_STDERR, UI_RUN_STDOUT}; use crate::common::{output_base_dir, output_base_name, output_testname_unique}; @@ -333,17 +333,16 @@ impl<'test> TestCx<'test> { } fn should_run(&self) -> bool { - let pass_mode = self.pass_mode(); match self.config.mode { - Ui => pass_mode == Some(PassMode::Run) || pass_mode == Some(PassMode::RunFail), + Ui => self.pass_mode() == Some(PassMode::Run) + || self.props.fail_mode == Some(FailMode::Run), mode => panic!("unimplemented for mode {:?}", mode), } } fn should_run_successfully(&self) -> bool { - let pass_mode = self.pass_mode(); match self.config.mode { - Ui => pass_mode == Some(PassMode::Run), + Ui => self.pass_mode() == Some(PassMode::Run), mode => panic!("unimplemented for mode {:?}", mode), } } @@ -352,7 +351,7 @@ impl<'test> TestCx<'test> { match self.config.mode { CompileFail => false, JsDocTest => true, - Ui => self.pass_mode().is_some(), + Ui => self.pass_mode().is_some() || self.props.fail_mode > Some(FailMode::Build), Incremental => { let revision = self.revision .expect("incremental tests require a list of revisions"); @@ -1377,7 +1376,7 @@ impl<'test> TestCx<'test> { fn check_error_patterns(&self, output_to_check: &str, proc_res: &ProcRes) { debug!("check_error_patterns"); if self.props.error_patterns.is_empty() { - if self.pass_mode().is_some() { + if self.props.fail_mode != Some(FailMode::Run) { return; } else { self.fatal(&format!( @@ -2029,7 +2028,9 @@ impl<'test> TestCx<'test> { } } - if let Some(PassMode::Check) = self.pass_mode() { + if let (Some(PassMode::Check), ..) | (_, Some(FailMode::Check), Ui) + = (self.pass_mode(), self.props.fail_mode, self.config.mode) + { rustc.args(&["--emit", "metadata"]); }