]> git.proxmox.com Git - rustc.git/blob - src/test/ui/consts/const_unsafe_unreachable_ub.stderr
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / consts / const_unsafe_unreachable_ub.stderr
1 warning: any use of this value will cause an error
2 --> $SRC_DIR/core/src/hint.rs:LL:COL
3 |
4 LL | unsafe { intrinsics::unreachable() }
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^
6 | |
7 | entering unreachable code
8 | inside `unreachable_unchecked` at $SRC_DIR/core/src/hint.rs:LL:COL
9 | inside `foo` at $DIR/const_unsafe_unreachable_ub.rs:9:18
10 | inside `BAR` at $DIR/const_unsafe_unreachable_ub.rs:14:28
11 |
12 ::: $DIR/const_unsafe_unreachable_ub.rs:14:1
13 |
14 LL | const BAR: bool = unsafe { foo(false) };
15 | ----------------------------------------
16 |
17 note: the lint level is defined here
18 --> $DIR/const_unsafe_unreachable_ub.rs:13:8
19 |
20 LL | #[warn(const_err)]
21 | ^^^^^^^^^
22
23 error[E0080]: evaluation of constant expression failed
24 --> $DIR/const_unsafe_unreachable_ub.rs:17:3
25 |
26 LL | assert_eq!(BAR, true);
27 | ^^^^^^^^^^^---^^^^^^^^
28 | |
29 | referenced constant has errors
30 |
31 = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
32
33 error: erroneous constant used
34 --> $DIR/const_unsafe_unreachable_ub.rs:17:3
35 |
36 LL | assert_eq!(BAR, true);
37 | ^^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors
38 |
39 = note: `#[deny(const_err)]` on by default
40 = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
41
42 error: aborting due to 2 previous errors; 1 warning emitted
43
44 For more information about this error, try `rustc --explain E0080`.