summaryrefslogtreecommitdiffstats
path: root/src/test/ui/generic-associated-types/bugs/issue-88460.rs
blob: f1c3b2269158a8ee7abc879ff4c3416642bbd315 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// check-fail
// known-bug: #88460

// This should pass, but has a missed normalization due to HRTB.

#![feature(generic_associated_types)]

pub trait Marker {}

pub trait Trait {
    type Assoc<'a>;
}

fn test<T>(value: T)
where
    T: Trait,
    for<'a> T::Assoc<'a>: Marker,
{
}

impl Marker for () {}

struct Foo;

impl Trait for Foo {
    type Assoc<'a> = ();
}

fn main() {
    test(Foo);
}