-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Consolidate all associated items on the NonZero integer types into a single impl block per type #118665
Merged
Commits on Jan 14, 2024
-
Move nonzero_integers macro call to bottom of module
This way all the other macros defined in this module, such as nonzero_leading_trailing_zeros, are available to call within the expansion of nonzero_integers. (Macros defined by macro_rules cannot be called from the same module above the location of the macro_rules.) In this commit the ability to call things like nonzero_leading_trailing_zeros is not immediately used, but later commits in this stack will be consolidating the entire API of NonZeroT to be generated through nonzero_integers, and will need to make use of some of the other macros to do that.
Configuration menu - View commit details
-
Copy full SHA for 56df3bb - Browse repository at this point
Copy the full SHA 56df3bbView commit details -
Define only a single NonZero type per macro call
Later in this stack, as the nonzero_integers macro is going to be responsible for producing a larger fraction of the API for the NonZero integer types, it will need to receive a number of additional arguments beyond the ones currently seen here. Additional arguments, especially named arguments across multiple lines, will turn out clearer if everything in one macro call is for the same NonZero type. This commit adopts a similar arrangement to what we do for generating the API of the integer primitives (`impl u8` etc), which also generate a single type's API per top-level macro call, rather than generating all 12 impl blocks for the 12 types from one macro call.
Configuration menu - View commit details
-
Copy full SHA for 54cb822 - Browse repository at this point
Copy the full SHA 54cb822View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9196d2a - Browse repository at this point
Copy the full SHA 9196d2aView commit details -
Format nonzero_integer macro calls same way we do the primitive int i…
…mpls The `key = $value` style will be beneficial as we introduce some more macro arguments here in later commits.
Configuration menu - View commit details
-
Copy full SHA for a6152cd - Browse repository at this point
Copy the full SHA a6152cdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3de0af1 - Browse repository at this point
Copy the full SHA 3de0af1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 81e1a7c - Browse repository at this point
Copy the full SHA 81e1a7cView commit details -
Configuration menu - View commit details
-
Copy full SHA for a78d9a6 - Browse repository at this point
Copy the full SHA a78d9a6View commit details -
Configuration menu - View commit details
-
Copy full SHA for f846ed5 - Browse repository at this point
Copy the full SHA f846ed5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 757ed25 - Browse repository at this point
Copy the full SHA 757ed25View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4291b3f - Browse repository at this point
Copy the full SHA 4291b3fView commit details -
Configuration menu - View commit details
-
Copy full SHA for b21b9cc - Browse repository at this point
Copy the full SHA b21b9ccView commit details -
Configuration menu - View commit details
-
Copy full SHA for c6d776e - Browse repository at this point
Copy the full SHA c6d776eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 63256af - Browse repository at this point
Copy the full SHA 63256afView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4419136 - Browse repository at this point
Copy the full SHA 4419136View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7f7c5af - Browse repository at this point
Copy the full SHA 7f7c5afView commit details -
Configuration menu - View commit details
-
Copy full SHA for 66cda3b - Browse repository at this point
Copy the full SHA 66cda3bView commit details -
Configuration menu - View commit details
-
Copy full SHA for c537132 - Browse repository at this point
Copy the full SHA c537132View commit details -
tidy error: /git/rust/library/core/src/num/nonzero.rs:67: malformed stability attribute: missing `feature` key tidy error: /git/rust/library/core/src/num/nonzero.rs:82: malformed stability attribute: missing `feature` key tidy error: /git/rust/library/core/src/num/nonzero.rs:98: malformed stability attribute: missing the `since` key tidy error: /git/rust/library/core/src/num/nonzero.rs:112: malformed stability attribute: missing `feature` key tidy error: /git/rust/library/core/src/num/nonzero.rs:450: malformed stability attribute: missing `feature` key some tidy checks failed
Configuration menu - View commit details
-
Copy full SHA for cdee1fe - Browse repository at this point
Copy the full SHA cdee1feView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.