]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/issue-57700.rs
Auto merge of #95454 - randomicon00:fix95444, r=wesleywiser
[rust.git] / src / test / ui / type-alias-impl-trait / issue-57700.rs
1 #![feature(arbitrary_self_types)]
2 #![feature(type_alias_impl_trait)]
3
4 use std::ops::Deref;
5
6 trait Foo {
7     type Bar: Foo;
8
9     fn foo(self: impl Deref<Target = Self>) -> Self::Bar;
10 }
11
12 impl<C> Foo for C {
13     type Bar = impl Foo;
14
15     fn foo(self: impl Deref<Target = Self>) -> Self::Bar {
16         self
17         //~^ Error type parameter `impl Deref<Target = Self>` is part of concrete type but not used in parameter list for the `impl Trait` type alias
18     }
19 }
20
21 fn main() {}