mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
13 lines
327 B
Rust
13 lines
327 B
Rust
trait Trait {}
|
|
impl Trait for () {}
|
|
|
|
fn foo<T: Trait, U: Trait>() -> impl Trait {
|
|
//~^ WARN function cannot return without recursing [unconditional_recursion]
|
|
let a: T = foo::<T, U>();
|
|
loop {}
|
|
let _: T = foo::<U, T>();
|
|
//~^ ERROR concrete type differs from previous defining opaque type use
|
|
}
|
|
|
|
fn main() {}
|