mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 08:44:35 +00:00
15 lines
522 B
Rust
15 lines
522 B
Rust
const fn failure() {
|
|
panic!("{:?}", 0);
|
|
//~^ ERROR cannot call non-const formatting macro in constant functions
|
|
//~| ERROR cannot call non-const fn `Arguments::<'_>::new_v1::<1, 1>` in constant functions
|
|
}
|
|
|
|
const fn print() {
|
|
println!("{:?}", 0);
|
|
//~^ ERROR cannot call non-const formatting macro in constant functions
|
|
//~| ERROR cannot call non-const fn `Arguments::<'_>::new_v1::<2, 1>` in constant functions
|
|
//~| ERROR cannot call non-const fn `_print` in constant functions
|
|
}
|
|
|
|
fn main() {}
|