-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Update Clippy #74324
Update Clippy #74324
Conversation
rust-lang#5626: lint iterator.map(|x| x) changelog: adds a new lint for iterator.map(|x| x) (see rust-lang/rust-clippy#5626) The code also lints for result.map(|x| x) and option.map(|x| x). Also, I'm not sure if I'm checking for type adjustments correctly and I can't think of an example where .map(|x| x) would apply type adjustments.
Context: this is needed to fix rust-lang/rustfmt#4263, which currently records the span of a const generic param incorrectly because the location of the `const` kw is not known. I am not sure how to add tests for this; any guidance in how to do so would be appreciated 🙂
clone_on_copy - add machine applicability Fix rust-lang#4826. Change the applicability of the lint clone_on_copy. Split a test file and run rustfix on the clone_on_copy part. changelog: clone_on_copy - add machine applicability
cmp_owned: handle when PartialEq is not implemented symmetrically changelog: Handle asymmetrical implementations of PartialEq in [`cmp_owned`]. Fixes rust-lang#4874
Change a noun to a verb to make the sentence complete changelog: Fixed some grammar in the documentation for `await_holding_lock`. Just a tiny little thing I found while using clippy <3
…morse Record span of `const` kw in GenericParamKind Context: this is needed for a fix of rust-lang/rustfmt#4263, which currently records the span of a const generic param incorrectly because the location of the `const` kw is not known. I am not sure how to add tests for this; any guidance in how to do so would be appreciated 🙂
…arth Rollup of 13 pull requests Successful merges: - rust-lang#72620 (Omit DW_AT_linkage_name when it is the same as DW_AT_name) - rust-lang#72967 (Don't move cursor in search box when using arrows to navigate results) - rust-lang#73102 (proc_macro: Stop flattening groups with dummy spans) - rust-lang#73297 (Support configurable deny-warnings for all in-tree crates.) - rust-lang#73507 (Cleanup MinGW LLVM linkage workaround) - rust-lang#73588 (Fix handling of reserved registers for ARM inline asm) - rust-lang#73597 (Record span of `const` kw in GenericParamKind) - rust-lang#73629 (Make AssocOp Copy) - rust-lang#73681 (Update Chalk to 0.14) - rust-lang#73707 (Fix links in `SliceIndex` documentation) - rust-lang#73719 (emitter: column width defaults to 140) - rust-lang#73729 (disable collectionbenches for android) - rust-lang#73748 (Add code block to code in documentation of `List::rebase_onto`) Failed merges: r? @ghost
This commit modifies the Place as follow: * remove 'ty' from ProjectionKind * add type information into to Projection * replace 'ty' in Place with 'base_ty' * introduce 'ty()' in `Place` to return the final type of the `Place` * introduce `ty_before_projection()` in `Place` to return the type of a `Place` before i'th projection is applied Closes rust-lang/project-rfc-2229#5
Rustup cc rust-lang#73743 r? @Manishearth changelog: none
…s, r=Manishearth,flip1995,phansch,oli-obk Lint enabling the whole restriction group I've added it to the `correctness` category, but I may be missing some valid use cases. In that case it could be changed to `pedantic`. changelog: Add [`blanket_clippy_restriction_lints`] to check against enabling the whole restriction group.
Require `or_patterns` to suggest nesting them changelog: Require `#![feature(or_patterns)]` to trigger [`unnested_or_patterns`] Fixes rust-lang#5704
Fix the versions of packages in the multiple_crate_versions ui test by checking in the Cargo.lock for the test package. `ansi_term 0.11` depends on `winapi ^0.3.4`. This means means that the expected stderr for this test would have to be updated whenever `winapi 0.3` is updated otherwise.
…701, r=matthiaskrgr Fix multiple_crate_versions error Fix the versions of packages in the multiple_crate_versions ui test by checking in the Cargo.lock for the test package. `ansi_term 0.11` depends on `winapi ^0.3.4`. This means means that the expected stderr for this test would have to be updated whenever `winapi 0.3` is updated otherwise. changelog: none
…hearth Deprecate regex_macro lint Closes rust-lang#2586 changelog: Deprecate regex_macro lint
Move range_minus_one to pedantic This moves the range_minus_one lint to the pedantic category, so there will not be any warnings emitted by default. This should work around problems where the suggestion is impossible to resolve due to the range consumer only accepting a specific range implementation, rather than the `RangeBounds` trait (see rust-lang#3307). While it is possible to work around this by extracting the boundary into a variable, I don't think clippy should encourage people to disable or work around lints, but instead the lints should be fixable. So hopefully this will help until a proper implementation checks what the range is used for. *Please keep the line below* changelog: move [`range_minus_one`] to pedantic
unnecessary_sort_by: avoid linting if key borrows changelog: Avoid linting if key borrows in [`unnecessary_sort_by`] Fixes rust-lang#5754 Closes rust-lang#2313
Fix out of bounds access by checking length equality BEFORE accessing by index. Fixes rust-lang#5780 changelog: fix out of bounds access in unnested_or_patterns lint. Edit: I did not bother reducing a testcase from `librustc_typeck` crate but I can confirm that with the change the crash no longer occurs.
…=phansch fix phrase in new_lint issue template changelog: none
Rollup of 5 pull requests Successful merges: - rust-lang#5443 (Some accuracy lints for floating point operations) - rust-lang#5752 (Move range_minus_one to pedantic) - rust-lang#5756 (unnecessary_sort_by: avoid linting if key borrows) - rust-lang#5784 (Fix out of bounds access by checking length equality BEFORE accessing by index.) - rust-lang#5786 (fix phrase in new_lint issue template) Failed merges: r? @ghost changelog: rollup
Use `constant_context`, `.is_str()` and `builtin_index()` to simplify.
The name "try" is confusing when shown as quick fix by rust-analyzer
Add a lint for `.repeat(1)` changelog: New lint `repeat_once` fix rust-lang#3028.
Rename collapsable_if fix suggestion to "collapse nested if block" The name "try" is confusing when shown as quick fix by rust-analyzer changelog: Rename `collapsable_if` fix suggestion to "collapse nested if block"
Every two weeks seems fine. We could also have clippy CI warn when it breaks and we do a two way sync whenever that happens @bors r+ p=1 |
📌 Commit f82ac4d has been approved by |
🌲 The tree is currently closed for pull requests below priority 5, this pull request will be tested once the tree is reopened |
@bors rollup=iffy |
Update Clippy ~~I'm not sure, if we can/should land this before beta is branched.~~ (Nvm, beta is already branched) The last Clippy update was 3 weeks ago: rust-lang#73660 This includes, besides other minor things: - New lints - One lint deprecation - One lint was moved to pedantic - Some FP fixes - I think an ICE fix? cc @Mark-Simulacrum r? @Manishearth --- We probably should also think of some process when and how often we should sync Clippy to the rust repo, so that we don't end up with those huge updates. Maybe every 2 weeks? Or even every week? cc @rust-lang/clippy
Alright, I already blocked off 2 hours in my calendar to do Clippy PR triage every other week. I'll also sync on these days then :) |
Sweet. I'll also set up a sync thing and maybe occasionally sync |
…arth Rollup of 15 pull requests Successful merges: - rust-lang#71237 (Add Ayu theme to rustdoc) - rust-lang#73720 (Clean up E0704 error explanation) - rust-lang#73866 (Obviate #[allow(improper_ctypes_definitions)]) - rust-lang#73965 (typeck: check for infer before type impls trait) - rust-lang#73986 (add (unchecked) indexing methods to raw (and NonNull) slices) - rust-lang#74173 (Detect tuple struct incorrectly used as struct pat) - rust-lang#74220 (Refactor Windows `parse_prefix`) - rust-lang#74227 (Remove an unwrap in layout computation) - rust-lang#74239 (Update llvm-project to latest origin/rustc/10.0-2020-05-05 commit ) - rust-lang#74257 (don't mark linux kernel module targets as a unix environment) - rust-lang#74270 (typeck: report placeholder type error w/out span) - rust-lang#74296 (Clarify the description for rfind) - rust-lang#74310 (Use `ArrayVec` in `SparseBitSet`.) - rust-lang#74316 (Remove unnecessary type hints from Wake internals) - rust-lang#74324 (Update Clippy) Failed merges: r? @ghost
I'm not sure, if we can/should land this before beta is branched.(Nvm, beta is already branched) The last Clippy update was 3 weeks ago: #73660This includes, besides other minor things:
cc @Mark-Simulacrum
r? @Manishearth
We probably should also think of some process when and how often we should sync Clippy to the rust repo, so that we don't end up with those huge updates. Maybe every 2 weeks? Or even every week? cc @rust-lang/clippy