You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This code now gives the following error on version 1.76.0 stable, which seems to indicate that the behavior is a bug:
warning: conflicting implementations of trait `Trait` for type `for<'a> fn(&'a ())`
--> src/lib.rs:11:1
|
7 | impl Traitforfor<'a> fn(&'a ()){
| --------------------------------- first implementation here
...
11 | impl Traitfor fn(&'static ()){
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `for<'a> fn(&'a ())`
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note:for more information, see issue #56105 <https://github.com/rust-lang/rust/issues/56105>
= note: this behavior recently changed as a result of a bug fix; see rust-lang/rust#56105 for details
= note: `#[warn(coherence_leak_check)]` on by default
👋 we intend to actually intend to accept this pattern long-term, so this warning will get end up getting removed without causing this code to error. We recently weakened the warning in rust-lang/rust#120716 to "the behavior may change in a future release".
The text was updated successfully, but these errors were encountered: