mirror of https://github.com/rust-lang/rust.git
13 lines
336 B
Rust
13 lines
336 B
Rust
const fn failure() {
|
|
panic!("{:?}", 0);
|
|
//~^ ERROR cannot call non-const formatting macro in constant functions
|
|
}
|
|
|
|
const fn print() {
|
|
println!("{:?}", 0);
|
|
//~^ ERROR cannot call non-const formatting macro in constant functions
|
|
//~| ERROR cannot call non-const function `_print` in constant functions
|
|
}
|
|
|
|
fn main() {}
|