]>
Commit | Line | Data |
---|---|---|
94222f64 | 1 | // edition:2021 |
94222f64 XL |
2 | #![crate_type = "lib"] |
3 | ||
c295e0f8 XL |
4 | const MSG: &str = "hello"; |
5 | ||
94222f64 XL |
6 | const A: () = std::panic!("blÄhaj"); |
7 | //~^ ERROR evaluation of constant value failed | |
8 | ||
9 | const B: () = std::panic!(); | |
10 | //~^ ERROR evaluation of constant value failed | |
11 | ||
12 | const C: () = std::unreachable!(); | |
13 | //~^ ERROR evaluation of constant value failed | |
14 | ||
15 | const D: () = std::unimplemented!(); | |
16 | //~^ ERROR evaluation of constant value failed | |
17 | ||
c295e0f8 XL |
18 | const E: () = std::panic!("{}", MSG); |
19 | //~^ ERROR evaluation of constant value failed | |
20 | ||
21 | const A_CORE: () = core::panic!("shark"); | |
22 | //~^ ERROR evaluation of constant value failed | |
23 | ||
24 | const B_CORE: () = core::panic!(); | |
94222f64 XL |
25 | //~^ ERROR evaluation of constant value failed |
26 | ||
c295e0f8 | 27 | const C_CORE: () = core::unreachable!(); |
94222f64 XL |
28 | //~^ ERROR evaluation of constant value failed |
29 | ||
c295e0f8 | 30 | const D_CORE: () = core::unimplemented!(); |
94222f64 XL |
31 | //~^ ERROR evaluation of constant value failed |
32 | ||
c295e0f8 | 33 | const E_CORE: () = core::panic!("{}", MSG); |
94222f64 | 34 | //~^ ERROR evaluation of constant value failed |