Skip to content

Stabilize generic NonZero. #124230

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Apr 23, 2024
Merged

Conversation

reitermarkus
Copy link
Contributor

Tracking issue: #120257

r? @dtolnay

@rustbot rustbot added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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 Apr 21, 2024
@rustbot
Copy link
Collaborator

rustbot commented Apr 21, 2024

The Miri subtree was changed

cc @rust-lang/miri

@reitermarkus reitermarkus force-pushed the generic-nonzero-stable branch from 6349bfb to fca5bab Compare April 21, 2024 16:49
@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 generic-nonzero-stable branch from 386e822 to 09df014 Compare April 21, 2024 19:48
@rust-log-analyzer

This comment has been minimized.

@reitermarkus reitermarkus force-pushed the generic-nonzero-stable branch 2 times, most recently from 9e4a7c6 to 2265ecb Compare April 21, 2024 20:01
@rust-log-analyzer

This comment has been minimized.

@reitermarkus reitermarkus force-pushed the generic-nonzero-stable branch from 2265ecb to 636f99c Compare April 22, 2024 16:48
@reitermarkus reitermarkus force-pushed the generic-nonzero-stable branch from 636f99c to 33e68aa Compare April 22, 2024 16:48
Copy link
Member

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicely done. Thank you for all your work on this feature.

@dtolnay
Copy link
Member

dtolnay commented Apr 22, 2024

@bors r+

@bors
Copy link
Collaborator

bors commented Apr 22, 2024

📌 Commit 33e68aa 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-review Status: Awaiting review from the assignee but also interested parties. labels Apr 22, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 22, 2024
…llaumeGomez

Rollup of 7 pull requests

Successful merges:

 - rust-lang#115913 (checked_ilog: improve performance)
 - rust-lang#124178 ([cleanup] [llvm backend] Prevent creating the same `Instance::mono` multiple times)
 - rust-lang#124183 (Stop taking `ParamTy`/`ParamConst`/`EarlyParamRegion`/`AliasTy` by ref)
 - rust-lang#124217 (coverage: Prepare for improved branch coverage)
 - rust-lang#124230 (Stabilize generic `NonZero`.)
 - rust-lang#124252 (Improve ICE message for forbidden dep-graph reads.)
 - rust-lang#124268 (Update books)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 23, 2024
…llaumeGomez

Rollup of 7 pull requests

Successful merges:

 - rust-lang#115913 (checked_ilog: improve performance)
 - rust-lang#124178 ([cleanup] [llvm backend] Prevent creating the same `Instance::mono` multiple times)
 - rust-lang#124183 (Stop taking `ParamTy`/`ParamConst`/`EarlyParamRegion`/`AliasTy` by ref)
 - rust-lang#124217 (coverage: Prepare for improved branch coverage)
 - rust-lang#124230 (Stabilize generic `NonZero`.)
 - rust-lang#124252 (Improve ICE message for forbidden dep-graph reads.)
 - rust-lang#124268 (Update books)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 6a326d8 into rust-lang:master Apr 23, 2024
@rustbot rustbot added this to the 1.79.0 milestone Apr 23, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Apr 23, 2024
Rollup merge of rust-lang#124230 - reitermarkus:generic-nonzero-stable, r=dtolnay

Stabilize generic `NonZero`.

Tracking issue: rust-lang#120257

r? `@dtolnay`
@reitermarkus reitermarkus deleted the generic-nonzero-stable branch May 1, 2024 15:58
@oxalica
Copy link
Contributor

oxalica commented Sep 24, 2024

Just noticed this after a few month after stabilization by seeing them from rust-analyzer completions. It has quite a poor discoverability for us old users familiar with NonZero*. Do we want to deprecate the old NonZero* (which are now type aliases. Is it possible?) to improve discoverability, or, if that's too intrusive, could we add a clippy warning for that?

There's some discussion on clippy side already: rust-lang/rust-clippy#13019

@reitermarkus
Copy link
Contributor Author

reitermarkus commented Sep 24, 2024

I already tried deprecating it, see #124587 (comment). Adding a clippy lint seems like a good start.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) 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.

7 participants