blob: 6a7df858febcf38d863a4e8d2b934e68bfa83571 [file] [log] [blame]
warning: skipping const checks
--> $DIR/non_const_fn.rs:10:15
|
LL | const C: () = foo();
| ^^^^^
warning: any use of this value will cause an error
--> $DIR/non_const_fn.rs:10:15
|
LL | const C: () = foo();
| --------------^^^^^-
| |
| calling non-const function `foo`
|
note: lint level defined here
--> $DIR/non_const_fn.rs:4:9
|
LL | #![warn(const_err)]
| ^^^^^^^^^
error[E0080]: evaluation of constant expression failed
--> $DIR/non_const_fn.rs:14:22
|
LL | println!("{:?}", C);
| ^ referenced constant has errors
warning: erroneous constant used
--> $DIR/non_const_fn.rs:14:22
|
LL | println!("{:?}", C);
| ^ referenced constant has errors
error: aborting due to previous error
For more information about this error, try `rustc --explain E0080`.