]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/issue-57700.rs
Rollup merge of #92715 - chordtoll:empty-string, r=davidtwco
[rust.git] / src / test / ui / type-alias-impl-trait / issue-57700.rs
1 // ignore-compare-mode-chalk
2 #![feature(arbitrary_self_types)]
3 #![feature(type_alias_impl_trait)]
4
5 use std::ops::Deref;
6
7 trait Foo {
8     type Bar: Foo;
9
10     fn foo(self: impl Deref<Target = Self>) -> Self::Bar;
11 }
12
13 impl<C> Foo for C {
14     type Bar = impl Foo;
15
16     fn foo(self: impl Deref<Target = Self>) -> Self::Bar {
17         self
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     }
20 }
21
22 fn main() {}