2021-07-22 19:16:33 +01:00
|
|
|
trait Trait {}
|
|
|
|
|
impl Trait for () {}
|
|
|
|
|
|
|
|
|
|
fn foo<'a: 'a>() {
|
|
|
|
|
let _x: impl Trait = ();
|
2023-10-04 19:51:43 +00:00
|
|
|
//~^ `impl Trait` only allowed in function and inherent method argument and return types
|
2021-07-22 19:16:33 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {}
|