]>
Commit | Line | Data |
---|---|---|
e74abb32 | 1 | warning: skipping const checks |
dfeec247 | 2 | --> $DIR/non_const_fn.rs:10:15 |
e74abb32 XL |
3 | | |
4 | LL | const C: () = foo(); | |
5 | | ^^^^^ | |
6 | ||
7 | warning: any use of this value will cause an error | |
dfeec247 | 8 | --> $DIR/non_const_fn.rs:10:15 |
e74abb32 XL |
9 | | |
10 | LL | const C: () = foo(); | |
11 | | --------------^^^^^- | |
12 | | | | |
13 | | calling non-const function `foo` | |
14 | | | |
74b04a01 | 15 | note: the lint level is defined here |
dfeec247 | 16 | --> $DIR/non_const_fn.rs:4:9 |
e74abb32 XL |
17 | | |
18 | LL | #![warn(const_err)] | |
19 | | ^^^^^^^^^ | |
20 | ||
21 | error[E0080]: evaluation of constant expression failed | |
dfeec247 XL |
22 | --> $DIR/non_const_fn.rs:14:22 |
23 | | | |
24 | LL | println!("{:?}", C); | |
25 | | ^ referenced constant has errors | |
26 | ||
27 | warning: erroneous constant used | |
28 | --> $DIR/non_const_fn.rs:14:22 | |
e74abb32 XL |
29 | | |
30 | LL | println!("{:?}", C); | |
31 | | ^ referenced constant has errors | |
32 | ||
ba9703b0 | 33 | error: aborting due to previous error; 3 warnings emitted |
e74abb32 XL |
34 | |
35 | For more information about this error, try `rustc --explain E0080`. |