]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/issues/issue-84919.rs
Auto merge of #105017 - matthiaskrgr:rollup-j0x550l, r=matthiaskrgr
[rust.git] / src / test / ui / impl-trait / issues / issue-84919.rs
1 trait Trait {}
2 impl Trait for () {}
3
4 fn foo<'a: 'a>() {
5     let _x: impl Trait = ();
6     //~^ `impl Trait` only allowed in function and inherent method return types
7 }
8
9 fn main() {}