1 // Capture a coherence pattern from wasm-bindgen that we discovered as part of
2 // future-compatibility warning #56105. This pattern currently receives a lint
3 // warning but we probably want to support it long term.
5 // Key distinction: we are implementing once for `A` (take ownership) and one
10 #![deny(coherence_leak_check)]
13 fn some_method(&self) {}
17 trait RefFromWasmAbi {}
18 trait ReturnWasmAbi {}
20 impl<'a, 'b, A, R> IntoWasmAbi for &'a (dyn Fn(A) -> R + 'b)
27 // Explicitly writing the bound lifetime.
28 impl<'a, 'b, A, R> IntoWasmAbi for &'a (dyn for<'x> Fn(&'x A) -> R + 'b)
33 //~^^^^^ ERROR conflicting implementation
34 //~| WARNING this was previously accepted