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 5 pull requests #4840

Merged
merged 24 commits into from
Nov 23, 2019
Merged

Rollup of 5 pull requests #4840

merged 24 commits into from
Nov 23, 2019

Conversation

flip1995
Copy link
Member

@flip1995 flip1995 commented Nov 23, 2019

Successful merges:

Failed merges:

r? @ghost

changelog: none

phansch and others added 24 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 <mati865@users.noreply.github.com>
…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
…, 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=5

@bors
Copy link
Contributor

bors commented Nov 23, 2019

📌 Commit b452400 has been approved by flip1995

@bors
Copy link
Contributor

bors commented Nov 23, 2019

⌛ Testing commit b452400 with merge eb8cd54...

bors added a commit that referenced this pull request Nov 23, 2019
Rollup of 5 pull requests

Successful merges:

 - #4730 (Fix check_infinite_loop (while_immutable_condition) by checking for break or return inside loop body)
 - #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
@bors
Copy link
Contributor

bors commented Nov 23, 2019

💔 Test failed - checks-travis

@flip1995
Copy link
Member Author

@bors retry

@bors
Copy link
Contributor

bors commented Nov 23, 2019

⌛ Testing commit b452400 with merge cc35165...

bors added a commit that referenced this pull request Nov 23, 2019
Rollup of 5 pull requests

Successful merges:

 - #4730 (Fix check_infinite_loop (while_immutable_condition) by checking for break or return inside loop body)
 - #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 successful - checks-travis, status-appveyor
Approved by: flip1995
Pushing cc35165 to master...

@bors bors merged commit b452400 into rust-lang:master Nov 23, 2019
@flip1995 flip1995 deleted the rollup-jqk3a3i branch November 24, 2019 13:48
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