mirror of
https://github.com/allankoechke/rust.git
synced 2026-11-30 17:26:12 +00:00
10 lines
194 B
Rust
10 lines
194 B
Rust
trait Trait {}
|
|
impl Trait for () {}
|
|
|
|
fn foo<'a: 'a>() {
|
|
let _x: impl Trait = ();
|
|
//~^ `impl Trait` only allowed in function and inherent method argument and return types
|
|
}
|
|
|
|
fn main() {}
|