-
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
Make the NonZero* methods const fn #54799
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @oli-obk (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
@@ -101,13 +101,13 @@ macro_rules! newtype_index { | |||
#[derive(Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord, $($derives),*)] | |||
#[rustc_layout_scalar_valid_range_end($max)] | |||
$v struct $type { | |||
private: u32 | |||
private: ::std::num::NonZeroU32 |
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.
We don't need this anymore now that we have rustc_layout_scalar_valid_range_end
, just keep the u32
☔ The latest upstream changes (presumably #55067) made this pull request unmergeable. Please resolve the merge conflicts. |
Ping from triage @JamesHinshelwood: It looks like some changes have been requested to your PR and it also needs to be rebased. |
@TimNN Sorry, been very busy lately. I will get these changes made within a week. |
8d07988
to
7d03a48
Compare
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
7d03a48
to
5e175e6
Compare
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
A test in run-pass-fulldeps is failing (it is testing the internal rustc API, so there's probably a call to from_u32_const left. |
Yep, will check it out. Weird that this didn't fail locally though. |
did you run |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
6a5ab4b
to
bb402f1
Compare
☔ The latest upstream changes (presumably #55356) made this pull request unmergeable. Please resolve the merge conflicts. |
pinging from triage. @JamesHinshelwood You have a few failures and conflicts to address. Any updates? |
pinging from triage @JamesHinshelwood Unfortunately we haven't heard from you on this in a while, so I'm closing the PR to keep things tidy. Don't worry though, if you'll have time again in the future please reopen this PR, we'll be happy to review it again! |
get
method aconst fn
, with a regression test added. Enabled withfeature(const_nonzero_methods)
.indexed_vec!
data structureconst fn
.const
->fn
changes in useNonZeroU32
innewtype_index!
macro, change syntax #53315Fixes #53331
r? @oli-obk