Auto merge of #66932 - rust-lang:pass-check-runfail, r=petrochenkov
Revamp `// run-fail` wrt. `--pass` & support `// build-fail` & `// check-fail` Revamp how `// run-fail` tests work internally by having a separate `FailMode` that does not interfere with `PassMode`. In particular, `--pass check` will now have no effect on `// *-fail` tests. Moreover, new test annotations `// check-fail` (the default) and `// build-fail` are added. The latter is useful to distinguish post-monomorphization failures from pre-monomorphization failures as seen throughout the PR. Finally, ensure that non-`Ui` tests do not listen to `--pass check` such that the flag can be used with e.g. `./x.py test --pass check` directly. Fixes #66929. Fixes #67128. r? @petrochenkov cc @RalfJung @ninjasource
This commit is contained in:
commit
6e9172f633
174 changed files with 613 additions and 406 deletions
|
@ -1,3 +1,4 @@
|
|||
// build-fail
|
||||
// ignore-emscripten no asm! support
|
||||
|
||||
#![feature(asm)]
|
||||
|
|
|
@ -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)}
|
||||
| ^^^^
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// build-fail
|
||||
|
||||
#![feature(repr_simd, platform_intrinsics, core_intrinsics)]
|
||||
#![allow(warnings)]
|
||||
#![crate_type = "rlib"]
|
||||
|
|
|
@ -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)
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
// Check to see if we can get parameters from an @argsfile file
|
||||
//
|
||||
// build-fail
|
||||
// compile-flags: --cfg cmdline_set @{{src-base}}/commandline-argfile-badutf8.args
|
||||
|
||||
#[cfg(not(cmdline_set))]
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Check to see if we can get parameters from an @argsfile file
|
||||
//
|
||||
// ignore-tidy-linelength
|
||||
// build-fail
|
||||
// normalize-stderr-test: "os error \d+" -> "os error $$ERR"
|
||||
// normalize-stderr-test: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING "
|
||||
// compile-flags: --cfg cmdline_set @{{src-base}}/commandline-argfile-missing.args
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// build-fail
|
||||
|
||||
fn main() {
|
||||
&{[1, 2, 3][4]};
|
||||
//~^ ERROR index out of bounds
|
||||
|
|
|
@ -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]};
|
||||
| --^^^^^^^^^^^^-
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// build-fail
|
||||
|
||||
#![warn(const_err)]
|
||||
|
||||
trait ZeroSized: Sized {
|
||||
|
|
|
@ -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::<Self>()];
|
||||
| -----------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
|
||||
|
@ -7,13 +7,13 @@ LL | const I_AM_ZERO_SIZED: () = [()][std::mem::size_of::<Self>()];
|
|||
| 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;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// build-fail
|
||||
// compile-flags: -Zforce-overflow-checks=on
|
||||
|
||||
#![allow(exceeding_bitshifts)]
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)]
|
||||
|
|
|
@ -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];
|
||||
| ^^^^^^^^
|
||||
|
|
|
@ -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)]
|
||||
|
|
|
@ -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];
|
||||
| ^^^^^^^^
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// build-fail
|
||||
|
||||
#![warn(const_err)]
|
||||
|
||||
const X: u32 = 5;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
// build-fail
|
||||
// compile-flags: -Zunleash-the-miri-inside-of-you
|
||||
|
||||
#![feature(const_fn)]
|
||||
#![allow(const_err)]
|
||||
|
||||
|
|
|
@ -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);
|
||||
| ^^^^^^^^^^^-^^^^^
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// build-fail
|
||||
|
||||
// Regression test for #66975
|
||||
#![warn(const_err)]
|
||||
#![feature(never_type)]
|
||||
|
|
|
@ -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:10:61
|
||||
|
|
||||
LL | const VOID: ! = { let x = 0 * std::mem::size_of::<T>(); [][x] };
|
||||
| --------------------------------------------------------^^^^^---
|
||||
|
@ -7,13 +7,13 @@ LL | const VOID: ! = { let x = 0 * std::mem::size_of::<T>(); [][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:15:13
|
||||
|
|
||||
LL | let _ = PrintName::<T>::VOID;
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// build-fail
|
||||
|
||||
fn main() {
|
||||
let array = [std::env::args().len()];
|
||||
array[1]; //~ ERROR index out of bounds
|
||||
|
|
|
@ -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];
|
||||
| ^^^^^^^^
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// build-fail
|
||||
|
||||
#![warn(const_err)]
|
||||
|
||||
const fn foo(x: u32) -> u32 {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// build-fail
|
||||
|
||||
#![allow(const_err)]
|
||||
|
||||
trait Foo {
|
||||
|
|
|
@ -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!("{}", <Bar<u16, u8> as Foo>::AMT);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// build-fail
|
||||
|
||||
trait C {
|
||||
const BOO: usize;
|
||||
}
|
||||
|
|
|
@ -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 | &<A<T> as Foo<T>>::BAR
|
||||
| ^---------------------
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// build-fail
|
||||
|
||||
trait Unsigned {
|
||||
const MAX: u8;
|
||||
}
|
||||
|
|
|
@ -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::<U8,U8>::MAX
|
||||
| ^-----------------
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// build-fail
|
||||
|
||||
// Regression test for #66975
|
||||
#![warn(const_err)]
|
||||
#![feature(const_panic)]
|
||||
|
|
|
@ -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:11: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:11: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:16:13
|
||||
|
|
||||
LL | let _ = PrintName::VOID;
|
||||
| ^^^^^^^^^^^^^^^ referenced constant has errors
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// build-fail
|
||||
|
||||
// Regression test for #66975
|
||||
#![warn(const_err)]
|
||||
#![feature(const_panic)]
|
||||
|
|
|
@ -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:8: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:8: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:12:13
|
||||
|
|
||||
LL | let _ = VOID;
|
||||
| ^^^^ referenced constant has errors
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// build-fail
|
||||
// compile-flags: -O
|
||||
|
||||
#![deny(const_err)]
|
||||
|
|
|
@ -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);
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// build-fail
|
||||
// compile-flags: -C overflow-checks=on -O
|
||||
|
||||
#![deny(const_err)]
|
||||
|
|
|
@ -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);
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// build-fail
|
||||
|
||||
fn main() {
|
||||
[0; 3][3u64 as usize]; //~ ERROR the len is 3 but the index is 3
|
||||
}
|
||||
|
|
|
@ -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];
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// build-fail
|
||||
|
||||
fn main() {
|
||||
enum Enum { One=1 }
|
||||
let xs=[0;1 as usize];
|
||||
|
|
|
@ -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]);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 as Bar<Vec<u32>, String>>::F;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// build-fail
|
||||
|
||||
#![allow(const_err)]
|
||||
|
||||
// a test demonstrating that const qualification cannot prevent monomorphization time errors
|
||||
|
|
|
@ -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 = <String as Bar<String>>::F;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// compile-fail
|
||||
// build-fail
|
||||
|
||||
pub const unsafe fn fake_type<T>() -> T {
|
||||
hint_unreachable()
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// build-fail
|
||||
|
||||
//
|
||||
#![crate_type="rlib"]
|
||||
#![allow(warnings)]
|
||||
|
|
|
@ -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 | |
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// build-fail
|
||||
|
||||
//
|
||||
#![crate_type="rlib"]
|
||||
#![allow(warnings)]
|
||||
|
|
|
@ -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 | |
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// build-fail
|
||||
|
||||
//
|
||||
#![crate_type="rlib"]
|
||||
#![allow(warnings)]
|
||||
|
|
|
@ -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 | |
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// build-fail
|
||||
|
||||
//
|
||||
// error-pattern: symbol `fail` is already defined
|
||||
#![crate_type="rlib"]
|
||||
|
|
|
@ -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) {}
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// build-fail
|
||||
|
||||
//
|
||||
#![crate_type="rlib"]
|
||||
#![allow(warnings)]
|
||||
|
|
|
@ -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 | |
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// build-fail
|
||||
|
||||
#![crate_type="rlib"]
|
||||
#![allow(warnings)]
|
||||
|
||||
|
|
|
@ -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;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// build-fail
|
||||
|
||||
//
|
||||
// error-pattern: entry symbol `main` defined multiple times
|
||||
|
||||
|
|
|
@ -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(){}
|
||||
| ^^^^^^^^^^^
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// build-fail
|
||||
|
||||
#![feature(platform_intrinsics)]
|
||||
|
||||
extern "platform-intrinsic" {
|
||||
|
|
|
@ -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); }
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// ignore-64bit
|
||||
// build-fail
|
||||
|
||||
// FIXME https://github.com/rust-lang/rust/issues/59774
|
||||
// normalize-stderr-test "thread.*panicked.*Metadata module not compiled.*\n" -> ""
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
error: the type `[u8; 2147516416]` is too big for the current architecture
|
||||
--> $DIR/huge-array-simple-32.rs:9:9
|
||||
--> $DIR/huge-array-simple-32.rs:10:9
|
||||
|
|
||||
LL | let _fat: [u8; (1<<31)+(1<<15)] =
|
||||
| ^^^^
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// build-fail
|
||||
// ignore-32bit
|
||||
|
||||
// FIXME https://github.com/rust-lang/rust/issues/59774
|
||||
|
|
|
@ -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)] =
|
||||
| ^^^^
|
||||
|
|
|
@ -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" -> ""
|
||||
|
||||
|
|
|
@ -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];
|
||||
| ^
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// build-fail
|
||||
// normalize-stderr-test "std::option::Option<\[u32; \d+\]>" -> "TYPE"
|
||||
// normalize-stderr-test "\[u32; \d+\]" -> "TYPE"
|
||||
|
||||
|
|
|
@ -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;
|
||||
| ^^^
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// build-fail
|
||||
// normalize-stderr-test "S32" -> "SXX"
|
||||
// normalize-stderr-test "S1M" -> "SXX"
|
||||
// error-pattern: too big for the current
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
error: the type `SXX<SXX<SXX<u32>>>` is too big for the current architecture
|
||||
--> $DIR/huge-struct.rs:49:9
|
||||
--> $DIR/huge-struct.rs:50:9
|
||||
|
|
||||
LL | let fat: Option<SXX<SXX<SXX<u32>>>> = None;
|
||||
| ^^^
|
||||
|
|
|
@ -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<Self>;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
error: reached the recursion limit while instantiating `function::<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<usize>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
|
||||
--> $DIR/infinite-instantiation.rs:23:1
|
||||
--> $DIR/infinite-instantiation.rs:25:1
|
||||
|
|
||||
LL | / fn function<T:ToOpt + Clone>(counter: usize, t: T) {
|
||||
LL | |
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// Test that the compiler will catch invalid inline assembly constraints.
|
||||
|
||||
// build-fail
|
||||
// ignore-emscripten
|
||||
|
||||
#![feature(asm)]
|
||||
|
|
|
@ -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)));
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
// Test that the compiler will catch passing invalid values to inline assembly
|
||||
// operands.
|
||||
|
||||
// build-fail
|
||||
// ignore-emscripten
|
||||
|
||||
#![feature(asm)]
|
||||
|
|
|
@ -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"));
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// build-fail
|
||||
// compile-flags: -C lto -C prefer-dynamic
|
||||
|
||||
// error-pattern: cannot prefer dynamic linking
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// ignore-64bit
|
||||
// build-fail
|
||||
|
||||
// FIXME https://github.com/rust-lang/rust/issues/59774
|
||||
// normalize-stderr-test "thread.*panicked.*Metadata module not compiled.*\n" -> ""
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
error: the type `[usize; 4294967295]` is too big for the current architecture
|
||||
--> $DIR/issue-15919-32.rs:8:9
|
||||
--> $DIR/issue-15919-32.rs:9:9
|
||||
|
|
||||
LL | let x = [0usize; 0xffff_ffff];
|
||||
| ^
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// build-fail
|
||||
// ignore-32bit
|
||||
|
||||
// FIXME https://github.com/rust-lang/rust/issues/59774
|
||||
|
|
|
@ -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];
|
||||
| ^
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// build-fail
|
||||
// normalize-stderr-test "\[&usize; \d+\]" -> "[&usize; N]"
|
||||
// error-pattern: too big for the current architecture
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// build-fail
|
||||
// normalize-stderr-test: "<\[closure@.+`" -> "$$CLOSURE`"
|
||||
|
||||
#![allow(unused)]
|
||||
|
|
|
@ -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<F: Fn()>(&self, f: &F) {
|
||||
LL | |
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#![feature(asm)]
|
||||
|
||||
// build-fail
|
||||
// only-x86_64
|
||||
|
||||
fn main() {
|
||||
|
|
|
@ -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: <inline asm>: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");
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
|
|
@ -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<T: ?Sized> Mirror for T { type It = Self; }
|
||||
struct S(Option<<S as Mirror>::It>);
|
||||
|
|
|
@ -3,7 +3,7 @@ error[E0391]: cycle detected when computing layout of `std::option::Option<S>`
|
|||
= note: ...which requires computing layout of `S`...
|
||||
= note: ...which again requires computing layout of `std::option::Option<S>`, completing the cycle
|
||||
note: cycle used when processing `main`
|
||||
--> $DIR/issue-26548.rs:9:1
|
||||
--> $DIR/issue-26548.rs:11:1
|
||||
|
|
||||
LL | fn main() {
|
||||
| ^^^^^^^^^
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// build-fail
|
||||
|
||||
trait Mirror {
|
||||
type Image;
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// build-fail
|
||||
// ignore-emscripten no asm! support
|
||||
|
||||
#![feature(asm)]
|
||||
|
|
|
@ -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"(""));
|
||||
| ^^
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue