1 // Test that our leak-check is not smart enough to take implied bounds
2 // into account (yet). Here we have two types that look like they
3 // should not be equivalent, but because of the rules on implied
4 // bounds we ought to know that, in fact, `'a = 'b` must always hold,
7 // Rustc can't figure this out and hence it accepts the impls but
8 // gives a future-compatibility warning (because we'd like to make
9 // this an error someday).
11 // Note that while we would like to make this a hard error, we also
12 // give the same warning for `coherence-wasm-bindgen.rs`, which ought
15 #![deny(coherence_leak_check)]
19 impl Trait for for<'a, 'b> fn(&'a &'b u32, &'b &'a u32) -> &'b u32 {}
21 impl Trait for for<'c> fn(&'c &'c u32, &'c &'c u32) -> &'c u32 {
22 //~^ ERROR conflicting implementations
23 //~| WARNING this was previously accepted by the compiler