summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/const-eval/format.rs
blob: 0d8b7c12d8abb798e2771f110146a36894f7532e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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 `Arguments::<'a>::new_v1` is not yet stable as a const fn
    //~| ERROR cannot call non-const fn `_print` in constant functions
}

fn main() {}