Skip to content
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

Merged
merged 4 commits into from
May 8, 2024

Conversation

reitermarkus
Copy link
Contributor

Tracking issue: #120257

r? @dtolnay

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 1, 2024
@rustbot
Copy link
Collaborator

rustbot commented May 1, 2024

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

@rustbot rustbot added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels May 1, 2024
@lnicola
Copy link
Member

lnicola commented May 1, 2024

In rust-analyzer we'd prefer an #[allow], because it needs to build on stable.

@rust-log-analyzer

This comment has been minimized.

@reitermarkus reitermarkus force-pushed the use-generic-nonzero branch 2 times, most recently from f034823 to 321dae5 Compare May 1, 2024 17:46
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@@ -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")]
Copy link
Member

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.

Copy link
Member

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).

Copy link
Contributor Author

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.

@bors
Copy link
Contributor

bors commented May 2, 2024

☔ The latest upstream changes (presumably #124521) made this pull request unmergeable. Please resolve the merge conflicts.

@rust-log-analyzer

This comment has been minimized.

@RalfJung
Copy link
Member

RalfJung commented May 3, 2024

Sorry, I won't be able to do further reviews here. I'm not a libs developer anyway.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@reitermarkus reitermarkus force-pushed the use-generic-nonzero branch 2 times, most recently from 29f2b54 to 92b8171 Compare May 4, 2024 18:37
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 5, 2024
@dtolnay
Copy link
Member

dtolnay commented May 5, 2024

LGTM with the 2 stability attributes fixed.

@bors delegate+

@bors
Copy link
Contributor

bors commented May 5, 2024

✌️ @reitermarkus, you can now approve this pull request!

If @dtolnay told you to "r=me" after making some further change, please make that change, then do @bors r=@dtolnay

@bors
Copy link
Contributor

bors commented May 5, 2024

☔ The latest upstream changes (presumably #124754) made this pull request unmergeable. Please resolve the merge conflicts.

@reitermarkus
Copy link
Contributor Author

@bors r+

@bors
Copy link
Contributor

bors commented May 8, 2024

📌 Commit bd8e565 has been approved by reitermarkus

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 8, 2024
@reitermarkus
Copy link
Contributor Author

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 8, 2024
@reitermarkus
Copy link
Contributor Author

@bors r=dtolnay

@bors
Copy link
Contributor

bors commented May 8, 2024

📌 Commit bd8e565 has been approved by dtolnay

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 8, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request May 8, 2024
…r=dtolnay

Generic `NonZero` post-stabilization changes.

Tracking issue: rust-lang#120257

r? `@dtolnay`
bors added a commit to rust-lang-ci/rust that referenced this pull request May 8, 2024
…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
@bors bors merged commit d8a3a69 into rust-lang:master May 8, 2024
6 checks passed
@rustbot rustbot added this to the 1.80.0 milestone May 8, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request May 8, 2024
Rollup merge of rust-lang#124587 - reitermarkus:use-generic-nonzero, r=dtolnay

Generic `NonZero` post-stabilization changes.

Tracking issue: rust-lang#120257

r? ``@dtolnay``
@reitermarkus reitermarkus deleted the use-generic-nonzero branch May 9, 2024 13:47
flip1995 pushed a commit to flip1995/rust that referenced this pull request May 17, 2024
…r=dtolnay

Generic `NonZero` post-stabilization changes.

Tracking issue: rust-lang#120257

r? ``@dtolnay``
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants