rust/src/test/ui/impl-trait/issues/issue-84919.rs

10 lines
179 B
Rust

trait Trait {}
impl Trait for () {}
fn foo<'a: 'a>() {
let _x: impl Trait = ();
//~^ `impl Trait` not allowed outside of function and method return types
}
fn main() {}