]>
Commit | Line | Data |
---|---|---|
416331ca | 1 | #![feature(arbitrary_self_types)] |
94222f64 | 2 | #![feature(type_alias_impl_trait)] |
416331ca XL |
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 { | |
416331ca | 16 | self |
ee023bcb | 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 |
416331ca XL |
18 | } |
19 | } | |
20 | ||
21 | fn main() {} |