Skip to content

Update Clippy #79228

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 149 commits into from
Nov 24, 2020
Merged

Update Clippy #79228

merged 149 commits into from
Nov 24, 2020

Conversation

flip1995
Copy link
Member

Biweekly Clippy update

r? @Manishearth

rail-rain and others added 30 commits October 4, 2020 18:12
* remove a 'ERROR' comment from `borrow`
   `Vec<AtomicUsize>` itself is `Freeze` as it holds the atomic in heap
* remove `ONCE_INIT` from `declare`
   it seems like an artifact from previous spliting
fix a false positive in two `interior_mutable_const` lints where a constant with enums gets linted
even if it uses a clearly unfrozen variant. Note that the code uses the MIR interpreter, which
the author of rust-lang#3962 thought unlikely to be a solution. This might be over-engineering;
but, I think it's important to be able to work with the 'http' crate (rust-lang#3825).
Format lint categories as a table with the default lint level.
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
…in_manual_async, r=Manishearth

Fix suggestion to add unneeded space in `manual_async`

Fix a same case as rust-lang/rust-clippy#6247

changelog: Fix suggestion to add unneeded space in `manual_async`
…r=llogiq

Fix unnecessary_lazy_eval suggestion applicability

changelog: Fix unnecessary_lazy_eval suggestion applicability when breaking type inference

Fixes rust-lang#6240
…=llogiq

"Respect" enums in `interior_mutable_const`

fixes rust-lang#3962
fixes rust-lang#3825

Hello,

It might not be a good idea to submit another relatively large PR while I have an opened PR; but, I've finished this anyway. This may be able to wait for months.

Note: the code uses the MIR interpreter, which the author of rust-lang#3962 thought unlikely to be a solution. This might be over-engineering; but, I think it's important to be able to work with the 'http' crate (rust-lang#3825). (And, I don't want to write a MIR visitor)

---

changelog: fix a false positive in two `interior_mutable_const` lints where a constant with enums gets linted
even if it uses a clearly unfrozen variant
Check when `from_utf8` is called from sliced byte array from string

---

*Please keep the line below*
changelog: Fix rust-lang#5487: Add linter to check when `from_utf8` is called from sliced byte array from string.
Readme improvements

~Moved the table of contents up, added an Overview heading.~

~Made the "All the Clippy Lints" link clearer.~

Formatted the lint categories as a table with the default lint level (instead of saying on/off by default). Tweaked the descriptions.

changelog: Improve Readme
Fix `await_holding_refcell_ref` examples for clarify

- Remove redundant `()`
- Fix variable name

changelog: none
FROM_ITER_INSTEAD_OF_COLLECT: avoid unwrapping unconditionally

Fixes rust-lang#6302

changelog: fix unwrap of None when checking libcore with clippy
do not trigger map_clone in the case of &mut

fixes rust-lang#6299
changelog: do not trigger map_clone in the case of &mut
@flip1995 flip1995 changed the title Update Clippy [WIP][DNM] Update Clippy Nov 22, 2020
Small grammar, punctuation, and code style improvements to docs

changelog: Made small grammar, punctuation, and code style improvements to docs

I recently found some places in rust-lang/rust that had lists without spaces after commas, which led me to look for more places, which led me over here to find:

- Some similar lists in code examples that could use spaces after commas to be idiomatic Rust style
- Some lists in documentation text that didn't have spaces after commas, needed an Oxford comma (fight me), or were otherwise misformatted
- Some other grammar improvements in the area of the other changes

These changes should only be in user-facing documentation or output.
@flip1995 flip1995 force-pushed the clippyup branch 3 times, most recently from 2879f50 to cd12d9c Compare November 23, 2020 08:53
@flip1995
Copy link
Member Author

@Manishearth 99b9459 fixed the ICE, but I'm not sure if the fix is correct. This ICE occurred, because of this debug assertion:

debug_assert!(!self.has_escaping_bound_vars(), "escaping bound vars for {:?}", self);

@flip1995 flip1995 changed the title [WIP][DNM] Update Clippy Update Clippy Nov 23, 2020
@Manishearth
Copy link
Member

cc @oli-obk @eddyb on the ICE

Idk what's going on there yeah. We should still merge this though and maybe file a follow-up

@oli-obk
Copy link
Contributor

oli-obk commented Nov 23, 2020

@bors r+

I'm trying to understand the issue, but the fix is conservative enough to definitely not make any problems, so let's merge this

@bors
Copy link
Collaborator

bors commented Nov 23, 2020

📌 Commit 99b9459 has been approved by oli-obk

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 23, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Nov 24, 2020
Update Clippy

Biweekly Clippy update

r? `@Manishearth`
@bors
Copy link
Collaborator

bors commented Nov 24, 2020

⌛ Testing commit 99b9459 with merge 238994f...

@bors
Copy link
Collaborator

bors commented Nov 24, 2020

☀️ Test successful - checks-actions
Approved by: oli-obk
Pushing 238994f to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 24, 2020
@bors bors merged commit 238994f into rust-lang:master Nov 24, 2020
@rustbot rustbot added this to the 1.50.0 milestone Nov 24, 2020
@flip1995 flip1995 deleted the clippyup branch November 24, 2020 09:43
flip1995 pushed a commit to flip1995/rust that referenced this pull request Dec 6, 2020
Update Clippy

Biweekly Clippy update

r? `@Manishearth`
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.