rust/tests/ui/consts/recursive.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
189 B
Rust
Raw Normal View History

#![allow(unused)]
const fn f<T>(x: T) { //~ WARN function cannot return without recursing
f(x);
2022-09-21 06:05:20 -05:00
//~^ ERROR evaluation of constant value failed
}
const X: () = f(1);
fn main() {}