Repository navigation
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.
Is this "since" line correct?
There was a problem hiding this comment.
This is going to be insta stable so I think so and it should be available on all versions
There was a problem hiding this comment.
What do you mean by "should be available on all versions"?
There was a problem hiding this comment.
Ah, you mean that if I make it since = 1.91 it will work not only in 1.91+? because in my opinion this should be available in all versions since 1.0
There was a problem hiding this comment.
This attribute is only describing when it was added for docs. We cannot add things to old versions.
There was a problem hiding this comment.
oh, ok then, I will change it after crater
There was a problem hiding this comment.
huh, seems like I can't?
error[E0711]: feature `async_closure` is declared stable since 1.93.0, but was previously declared stable since 1.85.0
--> library/core/src/ops/async_function.rs:130:5
|
130 | #[stable(feature = "async_closure", since = "1.93.0")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0711]: feature `rust1` is declared stable since 1.93.0, but was previously declared stable since 1.0.0
--> library/core/src/ops/function.rs:314:5
|
314 | #[stable(feature = "rust1", since = "1.93.0")]
| There was a problem hiding this comment.
it don't feel correct to change stable since for all impls
There was a problem hiding this comment.
What you've done might be fine, I've seen other PRs that just re-use an existing stable feature name and version for small gaps like this.
But for other PRs, if you want to declare them stable in the version where the PR merges, use:
| #[stable(feature = "rust1", since = "1.0.0")] | |
| #[stable(feature = "new_feature_name", since = "CURRENT_RUSTC_VERSION")] |
This does two things:
- makes the "consistent feature stable version" check pass (because it's a new feature)
- when the code is promoted to beta, CURRENT_RUSTC_VERSION will automatically get replaced with the current version
https://std-dev-guide.rust-lang.org/development/stabilization.html#stabilization-pr-checklist
|
@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 |
|
🎉 Experiment
Footnotes
|
|
@craterbot run mode=check-only crates=https://crater-reports.s3.amazonaws.com/pr-148271/retry-regressed-list.txt p=1 |
|
👌 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 |
|
r? libs |
|
r? libs |
| @@ -126,6 +126,16 @@ mod impls { | |||
| F::async_call_mut(self, args) | |||
| } | |||
| } | |||
|
|
|||
| #[stable(feature = "async_closure", since = "1.85.0")] | |||
|
@rustbot author |
given this r? types |
77295f7 to
ff0699c
Compare
|
Please send a patch to the currying crate to make it still compile after this PR lands. I assume this is possible with some manual annotations? @bors squash msg="Add missing |
This comment has been minimized.
This comment has been minimized.
|
🔨 2 commits were squashed into 1593ce3. |
ff0699c to
1593ce3
Compare
This comment was marked as resolved.
This comment was marked as resolved.
|
@bors squash msg="Add missing impl Fn for &mut F where F: Fn" |
This comment has been minimized.
This comment has been minimized.
|
🔨 1 commit was squashed into 95481db. |
1593ce3 to
95481db
Compare
|
The job Click to see the possible cause of the failure (guessed by this bot) |
View all comments
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