]> git.proxmox.com Git - rustc.git/blame - src/test/ui/type-alias-impl-trait/issue-57700.rs
New upstream version 1.61.0+dfsg1
[rustc.git] / src / test / ui / type-alias-impl-trait / issue-57700.rs
CommitLineData
416331ca 1#![feature(arbitrary_self_types)]
94222f64 2#![feature(type_alias_impl_trait)]
416331ca
XL
3
4use std::ops::Deref;
5
6trait Foo {
7 type Bar: Foo;
8
9 fn foo(self: impl Deref<Target = Self>) -> Self::Bar;
10}
11
12impl<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
21fn main() {}