mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-19 12:05:08 +00:00
12 lines
254 B
Rust
12 lines
254 B
Rust
|
#![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() {}
|