]> git.lizzy.rs Git - rust.git/blob - tests/ui/generic-associated-types/bugs/issue-88460.rs
Auto merge of #105102 - compiler-errors:copy-impl-considering-regions, r=lcnr
[rust.git] / tests / ui / generic-associated-types / bugs / issue-88460.rs
1 // check-fail
2 // known-bug: #88460
3
4 // This should pass, but has a missed normalization due to HRTB.
5
6 pub trait Marker {}
7
8 pub trait Trait {
9     type Assoc<'a>;
10 }
11
12 fn test<T>(value: T)
13 where
14     T: Trait,
15     for<'a> T::Assoc<'a>: Marker,
16 {
17 }
18
19 impl Marker for () {}
20
21 struct Foo;
22
23 impl Trait for Foo {
24     type Assoc<'a> = ();
25 }
26
27 fn main() {
28     test(Foo);
29 }