]> git.lizzy.rs Git - rust.git/blob - tests/ui/consts/issue-66693-panic-in-array-len.stderr
Rollup merge of #106427 - mejrs:translation_errors, r=davidtwco
[rust.git] / tests / ui / consts / issue-66693-panic-in-array-len.stderr
1 error: argument to `panic!()` in a const context must have type `&str`
2   --> $DIR/issue-66693-panic-in-array-len.rs:6:20
3    |
4 LL |     let _ = [0i32; panic!(2f32)];
5    |                    ^^^^^^^^^^^^
6    |
7    = note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
8
9 error[E0080]: evaluation of constant value failed
10   --> $DIR/issue-66693-panic-in-array-len.rs:10:21
11    |
12 LL |     let _ = [false; panic!()];
13    |                     ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/issue-66693-panic-in-array-len.rs:10:21
14    |
15    = note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
16
17 error: aborting due to 2 previous errors
18
19 For more information about this error, try `rustc --explain E0080`.