]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.rs
Auto merge of #95454 - randomicon00:fix95444, r=wesleywiser
[rust.git] / src / test / ui / type-alias-impl-trait / incoherent-assoc-imp-trait.rs
1 // Regression test for issue 67856
2
3 #![feature(unboxed_closures)]
4 #![feature(type_alias_impl_trait)]
5 #![feature(fn_traits)]
6
7 trait MyTrait {}
8 impl MyTrait for () {}
9
10 impl<F> FnOnce<()> for &F {
11     //~^ ERROR type parameter `F` must be used
12     type Output = impl MyTrait;
13     extern "rust-call" fn call_once(self, _: ()) -> Self::Output {}
14 }
15 fn main() {}