rework run-fail and support check,build-fail

This commit is contained in:
Mazdak Farrokhzad 2019-12-14 04:28:32 +01:00
parent d8b817810f
commit b4420c8f5c
160 changed files with 512 additions and 350 deletions

View File

@ -1,3 +1,4 @@
// build-fail
// ignore-emscripten no asm! support
#![feature(asm)]

View File

@ -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)}
| ^^^^

View File

@ -1,3 +1,5 @@
// build-fail
#![feature(repr_simd, platform_intrinsics, core_intrinsics)]
#![allow(warnings)]
#![crate_type = "rlib"]

View File

@ -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)
| ^^^^^^^^^^^^^^

View File

@ -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

View File

@ -1,3 +1,5 @@
// build-fail
fn main() {
&{[1, 2, 3][4]};
//~^ ERROR index out of bounds

View File

@ -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]};
| --^^^^^^^^^^^^-

View File

@ -1,3 +1,5 @@
// build-fail
#![warn(const_err)]
trait ZeroSized: Sized {

View File

@ -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;
| ^^^^^^^^^^^^^^^^^^^^^

View File

@ -1,3 +1,4 @@
// build-fail
// compile-flags: -Zforce-overflow-checks=on
#![allow(exceeding_bitshifts)]

View File

@ -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

View File

@ -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)]

View File

@ -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];
| ^^^^^^^^

View File

@ -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)]

View File

@ -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];
| ^^^^^^^^

View File

@ -1,3 +1,5 @@
// build-fail
#![warn(const_err)]
const X: u32 = 5;

View File

@ -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

View File

@ -1,4 +1,6 @@
// build-fail
// compile-flags: -Zunleash-the-miri-inside-of-you
#![feature(const_fn)]
#![allow(const_err)]

View File

@ -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);
| ^^^^^^^^^^^-^^^^^

View File

@ -1,3 +1,5 @@
// build-fail
// Regression test for #66975
#![warn(const_err)]
#![feature(never_type)]

View File

@ -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::<T>(); [][x] };
| --------------------------------------------------------^^^^^---
@ -7,16 +7,15 @@ 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:14:13
|
LL | let _ = PrintName::<T>::VOID;
| ^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error

View File

@ -1,3 +1,5 @@
// build-fail
fn main() {
let array = [std::env::args().len()];
array[1]; //~ ERROR index out of bounds

View File

@ -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];
| ^^^^^^^^

View File

@ -1,3 +1,5 @@
// build-fail
#![warn(const_err)]
const fn foo(x: u32) -> u32 {

View File

@ -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

View File

@ -1,3 +1,5 @@
// build-fail
#![allow(const_err)]
trait Foo {

View File

@ -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

View File

@ -1,3 +1,5 @@
// build-fail
trait C {
const BOO: usize;
}

View File

@ -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
| ^---------------------

View File

@ -1,3 +1,5 @@
// build-fail
trait Unsigned {
const MAX: u8;
}

View File

@ -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
| ^-----------------

View File

@ -1,3 +1,5 @@
// build-fail
// Regression test for #66975
#![warn(const_err)]
#![feature(const_panic)]

View File

@ -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

View File

@ -1,3 +1,5 @@
// build-fail
// Regression test for #66975
#![warn(const_err)]
#![feature(const_panic)]

View File

@ -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

View File

@ -1,3 +1,4 @@
// build-fail
// compile-flags: -O
#![deny(const_err)]

View File

@ -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);
| ^^^^^^^^^^^^^^^^

View File

@ -1,3 +1,4 @@
// build-fail
// compile-flags: -C overflow-checks=on -O
#![deny(const_err)]

View File

@ -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);
| ^^^^^^^^^^^^^^^^

View File

@ -1,3 +1,5 @@
// build-fail
fn main() {
[0; 3][3u64 as usize]; //~ ERROR the len is 3 but the index is 3
}

View File

@ -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];
| ^^^^^^^^^^^^^^^^^^^^^

View File

@ -1,3 +1,5 @@
// build-fail
fn main() {
enum Enum { One=1 }
let xs=[0;1 as usize];

View File

@ -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]);
| ^^^^^^^^^^^^^^^^^^^^^^

View File

@ -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

View File

@ -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

View File

@ -1,3 +1,5 @@
// build-fail
#![allow(const_err)]
// a test demonstrating that const qualification cannot prevent monomorphization time errors

View File

@ -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

View File

@ -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.

View File

@ -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

View File

@ -1,4 +1,4 @@
// compile-fail
// build-fail
pub const unsafe fn fake_type<T>() -> T {
hint_unreachable()

View File

@ -1,3 +1,5 @@
// build-fail
//
#![crate_type="rlib"]
#![allow(warnings)]

View File

@ -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 | |

View File

@ -1,3 +1,5 @@
// build-fail
//
#![crate_type="rlib"]
#![allow(warnings)]

View File

@ -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 | |

View File

@ -1,3 +1,5 @@
// build-fail
//
#![crate_type="rlib"]
#![allow(warnings)]

View File

@ -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 | |

View File

@ -1,3 +1,5 @@
// build-fail
//
// error-pattern: symbol `fail` is already defined
#![crate_type="rlib"]

View File

@ -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) {}
| ^^^^^^^^^^^^^^^^

View File

@ -1,3 +1,5 @@
// build-fail
//
#![crate_type="rlib"]
#![allow(warnings)]

View File

@ -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 | |

View File

@ -1,3 +1,5 @@
// build-fail
#![crate_type="rlib"]
#![allow(warnings)]

View File

@ -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;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View File

@ -1,3 +1,5 @@
// build-fail
//
// error-pattern: entry symbol `main` defined multiple times

View File

@ -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(){}
| ^^^^^^^^^^^

View File

@ -1,3 +1,5 @@
// build-fail
#![feature(platform_intrinsics)]
extern "platform-intrinsic" {

View File

@ -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); }
| ^^^^^^^^^^^^^^

View File

@ -1,3 +1,4 @@
// build-fail
// ignore-32bit
// FIXME https://github.com/rust-lang/rust/issues/59774

View File

@ -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)] =
| ^^^^

View File

@ -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" -> ""

View File

@ -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];
| ^

View File

@ -1,3 +1,4 @@
// build-fail
// normalize-stderr-test "std::option::Option<\[u32; \d+\]>" -> "TYPE"
// normalize-stderr-test "\[u32; \d+\]" -> "TYPE"

View File

@ -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;
| ^^^

View File

@ -1,3 +1,4 @@
// build-fail
// normalize-stderr-test "S32" -> "SXX"
// normalize-stderr-test "S1M" -> "SXX"
// error-pattern: too big for the current

View File

@ -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;
| ^^^

View File

@ -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>;
}

View File

@ -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 | |

View File

@ -1,5 +1,6 @@
// Test that the compiler will catch invalid inline assembly constraints.
// build-fail
// ignore-emscripten
#![feature(asm)]

View File

@ -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)));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View File

@ -1,6 +1,7 @@
// Test that the compiler will catch passing invalid values to inline assembly
// operands.
// build-fail
// ignore-emscripten
#![feature(asm)]

View File

@ -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"));
| ^^^^^^^^^^^^^

View File

@ -1,3 +1,4 @@
// build-fail
// compile-flags: -C lto -C prefer-dynamic
// error-pattern: cannot prefer dynamic linking

View File

@ -1,3 +1,4 @@
// build-fail
// ignore-32bit
// FIXME https://github.com/rust-lang/rust/issues/59774

View File

@ -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];
| ^

View File

@ -1,3 +1,4 @@
// build-fail
// normalize-stderr-test "\[&usize; \d+\]" -> "[&usize; N]"
// error-pattern: too big for the current architecture

View File

@ -1,3 +1,4 @@
// build-fail
// normalize-stderr-test: "<\[closure@.+`" -> "$$CLOSURE`"
#![allow(unused)]

View File

@ -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 | |

View File

@ -1,5 +1,6 @@
#![feature(asm)]
// build-fail
// only-x86_64
fn main() {

View File

@ -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");
| ^^^^^^^^^^^^^^^

View File

@ -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>);

View File

@ -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() {
| ^^^^^^^^^

View File

@ -1,3 +1,5 @@
// build-fail
trait Mirror {
type Image;
}

View File

@ -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();

View File

@ -1,3 +1,4 @@
// build-fail
// ignore-emscripten no asm! support
#![feature(asm)]

View File

@ -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"(""));
| ^^

View File

@ -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)]

View File

@ -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");
| ^^^^^^^^^^^

View File

@ -1,3 +1,5 @@
// build-fail
fn main() {
[1][0u64 as usize];
[1][1.5 as usize]; //~ ERROR index out of bounds

View File

@ -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];
| ^^^^^^^^^^^^^^^^^^

View File

@ -1,3 +1,4 @@
// build-fail
// compile-flags: -O
#![deny(const_err)]

View File

@ -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());
| ^^^^^^^^

Some files were not shown because too many files have changed in this diff Show More