rust/tests/ui/impl-trait/issues/issue-84919.rs
2023-01-11 09:32:08 +00:00

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() {}