]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/issue-57700.rs
Auto merge of #82347 - the8472:parallelize-tidy, r=Mark-Simulacrum
[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 // revisions: min_tait full_tait
5 #![feature(min_type_alias_impl_trait)]
6 #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
7 //[full_tait]~^ WARN incomplete
8
9 use std::ops::Deref;
10
11 trait Foo {
12     type Bar: Foo;
13
14     fn foo(self: impl Deref<Target = Self>) -> Self::Bar;
15 }
16
17 impl<C> Foo for C {
18     type Bar = impl Foo;
19
20     fn foo(self: impl Deref<Target = Self>) -> Self::Bar {
21     //~^ Error type parameter `impl Deref<Target = Self>` is part of concrete type but not used in parameter list for the `impl Trait` type alias
22         self
23     }
24 }
25
26 fn main() {}