summaryrefslogtreecommitdiffstats
path: root/src/test/ui/consts/recursive.rs
blob: 664940c52cfc5bf33bbda2c28886fae66e6033ba (plain)
1
2
3
4
5
6
7
8
9
10
11
#![allow(unused)]

const fn f<T>(x: T) { //~ WARN function cannot return without recursing
    f(x);
    //~^ ERROR any use of this value will cause an error
    //~| WARN this was previously accepted by the compiler
}

const X: () = f(1);

fn main() {}