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 11:05:20 +00:00
//~^ ERROR evaluation of constant value failed
}
const X: () = f(1);
fn main() {}