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