]> git.proxmox.com Git - rustc.git/blame - src/test/ui/consts/issue-66693-panic-in-array-len.stderr
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / consts / issue-66693-panic-in-array-len.stderr
CommitLineData
6a06907d 1error: argument to `panic!()` in a const context must have type `&str`
c295e0f8 2 --> $DIR/issue-66693-panic-in-array-len.rs:6:20
6a06907d
XL
3 |
4LL | let _ = [0i32; panic!(2f32)];
5 | ^^^^^^^^^^^^
6 |
064997fb 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)
6a06907d
XL
8
9error[E0080]: evaluation of constant value failed
c295e0f8 10 --> $DIR/issue-66693-panic-in-array-len.rs:10:21
6a06907d
XL
11 |
12LL | let _ = [false; panic!()];
c295e0f8 13 | ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/issue-66693-panic-in-array-len.rs:10:21
6a06907d 14 |
064997fb 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)
6a06907d
XL
16
17error: aborting due to 2 previous errors
18
19For more information about this error, try `rustc --explain E0080`.