-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Generic NonZero
post-stabilization changes.
#124587
Conversation
The Miri subtree was changed cc @rust-lang/miri Some changes occurred in src/tools/clippy cc @rust-lang/clippy This PR changes Stable MIR cc @oli-obk, @celinval, @ouz-a rust-analyzer is developed in its own repository. If possible, consider making this change to rust-lang/rust-analyzer instead. cc @rust-lang/rust-analyzer |
In rust-analyzer we'd prefer an |
This comment has been minimized.
This comment has been minimized.
f034823
to
321dae5
Compare
This comment has been minimized.
This comment has been minimized.
321dae5
to
364d54e
Compare
This comment has been minimized.
This comment has been minimized.
library/core/src/num/nonzero.rs
Outdated
@@ -490,19 +489,20 @@ macro_rules! nonzero_integer { | |||
/// | |||
/// [null pointer optimization]: crate::option#representation | |||
#[$stability] | |||
#[deprecated(since = "TBD", note = "replaced by the generic `NonZero` type")] |
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.
I don't think a deprecation of the NonZero* type aliases has been approved by the standard library team. It would be better to land all the other changes that can be landed without this deprecation (such as docs) as soon as possible, and move this deprecation into a separate PR for a slower team-wide consensus.
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.
I also feel like it may be good to wait a few releases before deprecating, so that crates with a MSRV policy of stable-N for small N will fix the deprecation instead of allowing the lint (and then forgetting to fix the deprecation later).
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.
wait a few releases before deprecating
Isn't that what deprecated_in_future
is meant for?
In any case I will move it into a separate PR.
☔ The latest upstream changes (presumably #124521) made this pull request unmergeable. Please resolve the merge conflicts. |
364d54e
to
6da034c
Compare
This comment has been minimized.
This comment has been minimized.
Sorry, I won't be able to do further reviews here. I'm not a libs developer anyway. |
6da034c
to
2e5c3d3
Compare
This comment has been minimized.
This comment has been minimized.
2e5c3d3
to
945a867
Compare
This comment has been minimized.
This comment has been minimized.
945a867
to
e8df878
Compare
This comment has been minimized.
This comment has been minimized.
e8df878
to
591d924
Compare
This comment has been minimized.
This comment has been minimized.
29f2b54
to
92b8171
Compare
LGTM with the 2 stability attributes fixed. @bors delegate+ |
✌️ @reitermarkus, you can now approve this pull request! If @dtolnay told you to " |
☔ The latest upstream changes (presumably #124754) made this pull request unmergeable. Please resolve the merge conflicts. |
0f851d2
to
bd8e565
Compare
@bors r+ |
@bors r- |
@bors r=dtolnay |
…r=dtolnay Generic `NonZero` post-stabilization changes. Tracking issue: rust-lang#120257 r? `@dtolnay`
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#123344 (Remove braces when fixing a nested use tree into a single item) - rust-lang#124587 (Generic `NonZero` post-stabilization changes.) - rust-lang#124775 (crashes: add lastest batch of crash tests) - rust-lang#124869 (Make sure we don't deny macro vars w keyword names) - rust-lang#124876 (Simplify `use crate::rustc_foo::bar` occurrences.) - rust-lang#124892 (Update cc crate to v1.0.97) - rust-lang#124903 (Ignore empty RUSTC_WRAPPER in bootstrap) - rust-lang#124909 (Reapply the part of rust-lang#124548 that bors forgot) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#124587 - reitermarkus:use-generic-nonzero, r=dtolnay Generic `NonZero` post-stabilization changes. Tracking issue: rust-lang#120257 r? ``@dtolnay``
…r=dtolnay Generic `NonZero` post-stabilization changes. Tracking issue: rust-lang#120257 r? ``@dtolnay``
Tracking issue: #120257
r? @dtolnay