-
Couldn't load subscription status.
- Fork 13.9k
Add missing impl Fn for &mut F where F: Fn
#148271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
@bors try |
This comment has been minimized.
This comment has been minimized.
Add missing `impl Fn for &mut F where F: Fn`
|
r? libs-api |
| } | ||
| } | ||
|
|
||
| #[stable(feature = "rust1", since = "1.0.0")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this "since" line correct?
|
@craterbot run mode=check-only |
|
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
|
🚧 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
Currently, there are blanket implementations for
&Fand&mut FforFnMutandFnOnce, but not forFn, as a result,&mut Fimplements fewer of theFntraits than&F, which is inconsistent and this PR fills that coherence holeTechnically, this is a breaking change because Fn is a fundamental trait, however, practical breakage is expected to be minimal, as such overlapping impl patterns are extremely rare
Because of this, second
implfor&mut fn()works fine but shouldn'tFixes #147931