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

Rollup of 6 pull requests #4838

Closed
wants to merge 28 commits into from
Closed

Conversation

flip1995
Copy link
Member

@flip1995 flip1995 commented Nov 23, 2019

Successful merges:

Failed merges:

r? @ghost

changelog: none

phansch and others added 28 commits November 11, 2019 07:59
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
@flip1995
Copy link
Member Author

@bors r+ p=6

@bors
Copy link
Contributor

bors commented Nov 23, 2019

📌 Commit 030ae86 has been approved by flip1995

@bors
Copy link
Contributor

bors commented Nov 23, 2019

⌛ Testing commit 030ae86 with merge 13d81bd...

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
@bors
Copy link
Contributor

bors commented Nov 23, 2019

💔 Test failed - checks-travis

@flip1995
Copy link
Member Author

#4764 failed

@flip1995 flip1995 closed this Nov 23, 2019
@flip1995 flip1995 deleted the rollup-defookd branch May 4, 2020 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants