Skip to content

Conversation

@flip1995
Copy link
Member

Out of cycle sync: I want to get rust-lang/rust-clippy#7129 into beta that is branched next week.

This sync only adds one new feature in efc4c6c, which looks fine to me. Otherwise it only contains bug fixes and/or restricts lints further.

r? @Manishearth

cherryblossom000 and others added 20 commits April 22, 2021 19:34
…ffen

Unused io amount detects `.read().ok()?`

fixes rust-lang#7096
changelog: unused_io_amount now detect expertion like `.read().ok()?`,  `.read().or_else(|err| ...)?` and similar expressions.
`single_component_path_imports`: ignore `pub(crate) use some_macro;`

Fixes rust-lang#7106

*Please write a short comment explaining your change (or "none" for internal only changes)*

changelog: Ignore exporting a macro within a crate using `pub(crate) use some_macro;` for [`single_component_path_imports`]
Fix lintcheck on windows

changelog: None
cloned_instead_of_copied MSRV

changelog: none
(since the lint is still new)

Fixes rust-lang#7127

r? `@Manishearth`
…Manishearth

extend `single_element_loop` to match `.iter()`

This extends `single_element_loop` to also match `[..].iter()` in the loop argument. Related to rust-lang#7125, but not completely fixing it due to the lint only firing if the array expression contains a local variable.

---

changelog: none
Finish MSRV for cloned_instead_of_copied

changelog: none

r? `@Manishearth`
Refactor MSRV aliases

changelog: Remove MSRV from `needless_question_mark` and change MSRV for `missing_const_for_fn` from 1.37.0 to 1.46.0.

First [mentioned on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/Better.20MSRV.20testing.20idea/near/236215074).

* Moves MSRV constants into `clippy_utils::msrvs`. Now they are named to represent a stabilized feature flag or library item that is required for a lint's suggestion.
* `needless_question_mark` no longer has MSRV. Not needed since it does not suggest adding `?`.
* `missing_const_for_fn` MSRV was changed from 1.37.0 to 1.46.0. This seems to be a past mistake.
…alid_sugg_macro_expansion, r=llogiq

manual_unwrap_or: fix invalid code suggestion, due to macro expansion

fixes rust-lang#6965

changelog: fix invalid code suggestion in `manual_unwrap_or` lint, due to macro expansion
@rust-highfive
Copy link
Contributor

Some changes occurred in src/tools/clippy.

cc @rust-lang/clippy

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 27, 2021
@Manishearth
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Apr 27, 2021

📌 Commit b65f488bef40275ddee00df6d74650be6cfbc657 has been approved by Manishearth

@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-review Status: Awaiting review from the assignee but also interested parties. labels Apr 27, 2021
…FN_with_large_array, r=Manishearth

Fix FN in `iter_cloned_collect` with a large array

fixes rust-lang#6808
changelog: Fix FN in `iter_cloned_collect` with a large array

I spotted that [is_iterable_array](https://github.com/rust-lang/rust-clippy/blob/a362a4d1d0edb66aef186c1d27b28c60573078f4/clippy_lints/src/loops/explicit_iter_loop.rs#L67-L75) function that `explicit_iter_loop` lint is using only works for array sizes <= 32.
There is this comment:
> IntoIterator is currently only implemented for array sizes <= 32 in rustc

I'm a bit confused, because I read that [IntoIterator for arrays](https://doc.rust-lang.org/src/core/array/mod.rs.html#194-201) with const generic `N` is stable since = "1.0.0". Although Const Generics MVP were stabilized in Rust 1.51.

Should I set MSRV for the current change? I will try to test with older compilers soon.
@flip1995
Copy link
Member Author

@bors r-

I want to also get this in, before merging: rust-lang/rust-clippy#7128

@bors bors removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Apr 27, 2021
@bors bors added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Apr 27, 2021
bors and others added 2 commits April 27, 2021 14:21
Fix ICE checking for feature gated const fn

fixes: rust-lang#7126
changelog: Fix ICE in `missing_const_for_fn` when using a feature-gated `const fn`
@flip1995
Copy link
Member Author

@bors r=Manishearth,flip1995

Updated. Tested locally.

@bors
Copy link
Collaborator

bors commented Apr 27, 2021

📌 Commit d4af90e has been approved by Manishearth,flip1995

@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 Apr 27, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 27, 2021
Rollup of 5 pull requests

Successful merges:

 - rust-lang#84132 (Ignore nonstandard lldb version strings in compiletest)
 - rust-lang#84521 (Reuse modules on `hermit`)
 - rust-lang#84563 (Update backtrace to 0.3.57)
 - rust-lang#84610 (Update Clippy)
 - rust-lang#84613 (move representability checks to rustc_ty_utils)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 38e0dbd into rust-lang:master Apr 27, 2021
@rustbot rustbot added this to the 1.53.0 milestone Apr 27, 2021
@flip1995 flip1995 deleted the clippyup branch April 27, 2021 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.