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