]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.rs
Rollup merge of #86747 - FabianWolff:issue-86653, r=GuillaumeGomez
[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 conflicting implementations
12     //~| ERROR type parameter `F` must be used
13     type Output = impl MyTrait;
14     extern "rust-call" fn call_once(self, _: ()) -> Self::Output {}
15 }
16 fn main() {}