]> git.proxmox.com Git - rustc.git/blame - src/test/ui/type-alias-impl-trait/bound_reduction2.rs
New upstream version 1.57.0+dfsg1
[rustc.git] / src / test / ui / type-alias-impl-trait / bound_reduction2.rs
CommitLineData
94222f64 1#![feature(type_alias_impl_trait)]
0531ce1d 2
1b1a35ee 3fn main() {}
8faf50e0
XL
4
5trait TraitWithAssoc {
6 type Assoc;
7}
8
416331ca 9type Foo<V> = impl Trait<V>;
c295e0f8 10//~^ ERROR could not find defining uses
8faf50e0
XL
11
12trait Trait<U> {}
0531ce1d 13
8faf50e0 14impl<W> Trait<W> for () {}
0531ce1d 15
ba9703b0 16fn foo_desugared<T: TraitWithAssoc>(_: T) -> Foo<T::Assoc> {
1b1a35ee 17 //~^ ERROR non-defining opaque type use in defining scope
c295e0f8
XL
18 //~| ERROR non-defining opaque type use in defining scope
19 //~| ERROR non-defining opaque type use in defining scope
20 //~| ERROR `T` is part of concrete type but not used in parameter list
21 //~| ERROR `T` is part of concrete type but not used in parameter list
8faf50e0 22 ()
54a0048b 23}