]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/bugs/issue-88460.rs
Rollup merge of #93613 - crlf0710:rename_to_async_iter, r=yaahc
[rust.git] / src / test / ui / generic-associated-types / bugs / issue-88460.rs
1 // check-fail
2
3 // This should pass, but has a missed normalization due to HRTB.
4
5 #![feature(generic_associated_types)]
6
7 pub trait Marker {}
8
9 pub trait Trait {
10     type Assoc<'a>;
11 }
12
13 fn test<T>(value: T)
14 where
15     T: Trait,
16     for<'a> T::Assoc<'a>: Marker,
17 {
18 }
19
20 impl Marker for () {}
21
22 struct Foo;
23
24 impl Trait for Foo {
25     type Assoc<'a> = ();
26 }
27
28 fn main() {
29     test(Foo);
30     //~^ the trait bound
31 }