rust/tests/ui/generic-associated-types/bugs/issue-88460.rs

27 lines
272 B
Rust

//@ check-pass
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);
}