Repository navigation
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: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -310,4 +310,15 @@ mod impls { | |||||
| (*self).call_mut(args) | ||||||
| } | ||||||
| } | ||||||
|
|
||||||
| #[stable(feature = "rust1", since = "1.0.0")] | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this "since" line correct?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is going to be insta stable so I think so and it should be available on all versions
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What do you mean by "should be available on all versions"?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This attribute is only describing when it was added for docs. We cannot add things to old versions.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh, ok then, I will change it after crater
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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")]
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it don't feel correct to change stable since for all impls
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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:
Suggested change
This does two things:
https://std-dev-guide.rust-lang.org/development/stabilization.html#stabilization-pr-checklist |
||||||
| #[rustc_const_unstable(feature = "const_trait_impl", issue = "143874")] | ||||||
| impl<A: Tuple, F: ?Sized> const Fn<A> for &mut F | ||||||
| where | ||||||
| F: [const] Fn<A>, | ||||||
| { | ||||||
| extern "rust-call" fn call(&self, args: A) -> F::Output { | ||||||
| (**self).call(args) | ||||||
| } | ||||||
| } | ||||||
| } | ||||||
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.
This attribute is wrong too.