1 // Test that we consider these two types completely equal:
3 // * `for<'a, 'b> fn(&'a u32, &'b u32)`
4 // * `for<'c> fn(&'c u32, &'c u32)`
6 // For a long time we considered these to be distinct types. But in fact they
7 // are equivalent, if you work through the implications of subtyping -- this is
10 // * `'c` can be the intersection of `'a` and `'b` (and there is always an intersection)
11 // * `'a` and `'b` can both be equal to `'c`
14 impl Trait for for<'a, 'b> fn(&'a u32, &'b u32) {}
15 impl Trait for for<'c> fn(&'c u32, &'c u32) {
16 //~^ ERROR conflicting implementations
18 // Note in particular that we do NOT get a future-compatibility warning
19 // here. This is because the new leak-check proposed in [MCP 295] does not
20 // "error" when these two types are equated.
22 // [MCP 295]: https://github.com/rust-lang/compiler-team/issues/295