rust/tests/ui/higher-ranked/structually-relate-aliases.rs
Michael Goulet f956dc2e77 Bless tests
2024-10-15 20:42:17 -04:00

18 lines
381 B
Rust

// regression test for issue #121649.
trait ToUnit<'a> {
type Unit;
}
trait Overlap<T> {}
type Assoc<'a, T> = <T as ToUnit<'a>>::Unit;
impl<T> Overlap<T> for T {}
impl<T> Overlap<for<'a> fn(&'a (), Assoc<'a, T>)> for T {}
//~^ ERROR the trait bound `for<'a> T: ToUnit<'a>` is not satisfied
//~| ERROR the trait bound `for<'a> T: ToUnit<'a>` is not satisfied
fn main() {}