-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Rollup of 6 pull requests #4838
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This fixes a false positive in derive_hash_xor_eq where the lint was triggering on user-defined traits called `Hash`.
Combine macro expansion checks. Indentation is a little strange to avoid rustfmt issue.
Consolidate warning handling using "poor man's try".
Move suffix check into `check_lit` so that it isn't done repeatedly.
Simplify `grouping_hint` by splitting digits into parts and handling one at a time. Fixes rust-lang#4762
Use `split_digit_parts` in `check_lit`.
Add `group_digits` helper function.
Replace `do_lint` with `get_group_size`. Return `None` if there are no groups.
Store the digit parts directly in DigitInfo since we need them anyway.
Only store valid suffixes (and not mistyped suffixes) in DigitInfo. Check for mistyped suffixes later and not when DigitInfo is created. This opens the door to more sophisticated mistyped suffix checks later.
Rename DigitInfo to NumericLiteral
Rename `grouping_hint` to `format` and use the term consistently.
Export function for formatting literals and remove crate visibility from other items.
Simplify calculation in grouping. Add test case to ensure `count()` can't be zero in that branch.
Co-Authored-By: Mateusz Mikuła <[email protected]>
…p1995 Fix check_infinite_loop (while_immutable_condition) by checking for break or return inside loop body changelog: Fix check_infinite_loop (while_immutable_condition) by checking for break or return inside loop body fixes rust-lang#4648
Allow casts from the result of `checked_abs` to unsigned Fixes rust-lang#4743.
…, r=flip1995 Fix false positive in derive_hash_xor_eq This fixes a false positive in derive_hash_xor_eq where the lint was triggering on user-defined traits called `Hash`. changelog: Fix false positive in `derive_hash_xor_eq` Fixes rust-lang#4658
Literal Representation Restructure This pull request restructures the literal_representation module to be easier to understand and maintain. I split the changes into a lot of commits to make reviewing easier. changelog: none
doc: fix the comment above the lint function it's a simple comment fix. --- changelog: none
use more efficient code to generate repeated string see https://rust.godbolt.org/z/z9vrFP for comparison changelog: none
@bors r+ p=6 |
📌 Commit 030ae86 has been approved by |
bors
added a commit
that referenced
this pull request
Nov 23, 2019
Rollup of 6 pull requests Successful merges: - #4730 (Fix check_infinite_loop (while_immutable_condition) by checking for break or return inside loop body) - #4764 (Allow casts from the result of `checked_abs` to unsigned) - #4766 (Fix false positive in derive_hash_xor_eq) - #4811 (Literal Representation Restructure) - #4820 (doc: fix the comment above the lint function) - #4830 (use more efficient code to generate repeated string) Failed merges: r? @ghost changelog: none
💔 Test failed - checks-travis |
#4764 failed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Successful merges:
checked_abs
to unsigned #4764 (Allow casts from the result ofchecked_abs
to unsigned)Failed merges:
r? @ghost
changelog: none