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

Fix 'FIXME' about using NonZeroU32 instead of u32. #76851

Merged
merged 2 commits into from
Oct 2, 2020

Conversation

m-ou-se
Copy link
Member

@m-ou-se m-ou-se commented Sep 17, 2020

It was blocked by #58732 (const fn NonZeroU32::new), which is fixed now.

It was blocked by rust-lang#58732 (const fn NonZeroU32::new), which is fixed now.
@rust-highfive
Copy link
Collaborator

r? @petrochenkov

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 17, 2020
@jyn514 jyn514 added C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 17, 2020
@petrochenkov petrochenkov 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 Sep 18, 2020
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.

I like this. Having the Feature::issue field make 0 impossible to store is an improvement, even if to_nonzero is needed. A const and_then is likely much further out as it involves figuring out how to do a const callable FnOnce -- related to rust-lang/rfcs#2632 I guess.

Co-authored-by: David Tolnay <dtolnay@gmail.com>
@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Oct 1, 2020

📌 Commit 2140d80 has been approved by petrochenkov

@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 Oct 1, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Oct 1, 2020
…ero, r=petrochenkov

Fix 'FIXME' about using NonZeroU32 instead of u32.

It was blocked by rust-lang#58732 (const fn NonZeroU32::new), which is fixed now.
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 2, 2020
Rollup of 11 pull requests

Successful merges:

 - rust-lang#76851 (Fix 'FIXME' about using NonZeroU32 instead of u32.)
 - rust-lang#76979 (Improve std::sys::windows::compat)
 - rust-lang#77111 (Stabilize slice_ptr_range.)
 - rust-lang#77147 (Split sys_common::Mutex in StaticMutex and MovableMutex.)
 - rust-lang#77312 (Remove outdated line from `publish_toolstate` hook)
 - rust-lang#77362 (Fix is_absolute on WASI)
 - rust-lang#77375 (rustc_metadata: Do not forget to encode inherent impls for foreign types)
 - rust-lang#77385 (Improve the example for ptr::copy)
 - rust-lang#77389 (Fix some clippy lints)
 - rust-lang#77399 (BTreeMap: use Unique::from to avoid a cast where type information exists)
 - rust-lang#77429 (Link `new` method in `DefautHasher`s doc)

Failed merges:

r? `@ghost`
@bors bors merged commit 1fa5f8f into rust-lang:master Oct 2, 2020
@rustbot rustbot added this to the 1.48.0 milestone Oct 2, 2020
@dtolnay dtolnay self-assigned this Mar 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants