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 #5470

Merged
merged 18 commits into from
Apr 15, 2020
Merged

Rollup of 5 pull requests #5470

merged 18 commits into from
Apr 15, 2020

Conversation

flip1995
Copy link
Member

@flip1995 flip1995 commented Apr 15, 2020

Successful merges:

Failed merges:

r? @ghost

changelog: rollup

ThibsG and others added 18 commits April 9, 2020 09:09
With this change, the lint checks all operations that are defined as
being capable of overflow in the Rust Reference.
This reports the sizes of the largest and second-largest variants.
Add lint for explicit deref and deref_mut method calls

This PR adds the lint `explicit_deref_method` that suggests replacing `deref()` and `deref_mut()` with `&*a` and `&mut *a`.

It doesn't lint inside macros.

This PR is the continuation of  rust-lang#3258.

changelog: Add lint `explicit_deref_method`.

Fixes: rust-lang#1566
Add lint on large non scalar const

This PR adds the new lint `non_scalar_const` that aims to warn against `const` declaration of large arrays. For performance, because of inlining, large arrays should be preferably declared as `static`.

Note: i made this one to warn on all const arrays, whether they are in a body function or not. I don't know if this is really necessary, i could just reduce this lint to variables out of function scope.

Fixes: rust-lang#400

changelog: add new lint for large non-scalar types declared as const
…flip1995

Disallow bit-shifting in integer_arithmetic

Make the `integer_arithmetic` lint detect all the operations that are defined as being capable of overflow in the [Rust Reference](https://doc.rust-lang.org/reference/expressions/operator-expr.html#overflow), by also linting for bit-shifting operations (`<<`, `>>`).

changelog: Disallow bit-shifting in `integer_arithmetic`
…=flip1995

large_enum_variant: Report sizes of variants

This reports the sizes of the largest and second-largest variants.

Closes rust-lang#5459

changelog: `large_enum_variant`: Report the sizes of the largest and second-largest variants.
…ip1995

Zero single char names

Fixes: rust-lang#4086

changelog:
- Make the inequality strict
@flip1995
Copy link
Member Author

@bors p=2 r+

@bors
Copy link
Contributor

bors commented Apr 15, 2020

📌 Commit 19183a6 has been approved by flip1995

@bors
Copy link
Contributor

bors commented Apr 15, 2020

⌛ Testing commit 19183a6 with merge 6651c1b...

@bors
Copy link
Contributor

bors commented Apr 15, 2020

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: flip1995
Pushing 6651c1b to master...

@bors bors merged commit 6651c1b into rust-lang:master Apr 15, 2020
@flip1995 flip1995 deleted the rollup-cvkuiza branch April 15, 2020 18:53
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.

7 participants