rust/tests/ui/higher-ranked/structually-relate-aliases.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
326 B
Rust
Raw Normal View History

2024-03-23 10:33:43 -05:00
// 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 {}
2024-03-01 05:33:42 -06:00
//~^ ERROR conflicting implementations of trait `Overlap<for<'a> fn(&'a (), _)>`
2024-03-23 10:33:43 -05:00
fn main() {}