mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 00:03:43 +00:00
10 lines
181 B
Rust
10 lines
181 B
Rust
trait Trait {}
|
|
impl Trait for () {}
|
|
|
|
fn foo<'a: 'a>() {
|
|
let _x: impl Trait = ();
|
|
//~^ `impl Trait` only allowed in function and inherent method return types
|
|
}
|
|
|
|
fn main() {}
|