rust/tests/ui/impl-trait/issues/issue-84919.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

10 lines
181 B
Rust
Raw Normal View History

trait Trait {}
impl Trait for () {}
fn foo<'a: 'a>() {
let _x: impl Trait = ();
2022-02-17 19:18:42 -08:00
//~^ `impl Trait` only allowed in function and inherent method return types
}
fn main() {}