-
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
Clippyup #97248
Clippyup #97248
Commits on Apr 26, 2022
-
Configuration menu - View commit details
-
Copy full SHA for bdc8961 - Browse repository at this point
Copy the full SHA bdc8961View commit details -
Configuration menu - View commit details
-
Copy full SHA for 06cc1ab - Browse repository at this point
Copy the full SHA 06cc1abView commit details
Commits on Apr 27, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 948af01 - Browse repository at this point
Copy the full SHA 948af01View commit details
Commits on Apr 29, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 9173780 - Browse repository at this point
Copy the full SHA 9173780View commit details
Commits on Apr 30, 2022
-
Support negative ints in manual_range_contains
Fixes issue where ranges containing ints with different signs would be incorrect due to comparing as unsigned.
Configuration menu - View commit details
-
Copy full SHA for d102969 - Browse repository at this point
Copy the full SHA d102969View commit details
Commits on May 2, 2022
-
Fix
cast_lossless
to avoid warning onusize
tof64
conversion.Previously, the `cast_lossless` lint would issue a warning on code that converted a `usize` value to `f64`, on 32-bit targets. `usize` to `f64` is a lossless cast on 32-bit targets, however there is no corresponding `f64::from` that takes a `usize`, so `cast_lossless`'s suggested replacement does not compile. This PR disables the lint in the case of casting from `usize` or `isize`. Fixes rust-lang#3689. changelog: [`cast_lossless`] no longer gives wrong suggestion on usize->f64
Configuration menu - View commit details
-
Copy full SHA for 6ff77b9 - Browse repository at this point
Copy the full SHA 6ff77b9View commit details
Commits on May 3, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 2c70af3 - Browse repository at this point
Copy the full SHA 2c70af3View commit details
Commits on May 5, 2022
-
Configuration menu - View commit details
-
Copy full SHA for dd7bc86 - Browse repository at this point
Copy the full SHA dd7bc86View commit details -
Configuration menu - View commit details
-
Copy full SHA for f0c2ac8 - Browse repository at this point
Copy the full SHA f0c2ac8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7cd86aa - Browse repository at this point
Copy the full SHA 7cd86aaView commit details -
(Partially) Revert "HACK: Move buggy lints to nursery"
This reverts commit bb01aca. Partial: Keep regression tests
Configuration menu - View commit details
-
Copy full SHA for ed8458f - Browse repository at this point
Copy the full SHA ed8458fView commit details -
Added missing
### What it does
Adds the missing line to cast-slice-different-sizes lint documentation /closes 8781
Configuration menu - View commit details
-
Copy full SHA for 6881a5a - Browse repository at this point
Copy the full SHA 6881a5aView commit details -
Auto merge of rust-lang#8789 - fedemartinezdev:master, r=flip1995
Added missing `### What it does` Adds the missing line to ``[`cast-slice-different-sizes`]`` lint documentation fixes rust-lang#8781 changelog: none
Configuration menu - View commit details
-
Copy full SHA for 0509a96 - Browse repository at this point
Copy the full SHA 0509a96View commit details -
Revert hack fixing rust-lang#2475 added in commit 034c81b. It's no lo…
…nger needed.
Configuration menu - View commit details
-
Copy full SHA for 17bea31 - Browse repository at this point
Copy the full SHA 17bea31View commit details -
Auto merge of rust-lang#8790 - Jarcho:attribute_line, r=flip1995
Lint `empty_lint_after_outer_attr` on argumentless macros Reverts the change from 034c81b as it's no longer needed. The test is left just in case. Original issue is rust-lang#2475. changelog: Lint `empty_lint_after_outer_attr` on argumentless macros again
Configuration menu - View commit details
-
Copy full SHA for bf7182c - Browse repository at this point
Copy the full SHA bf7182cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4ed52bf - Browse repository at this point
Copy the full SHA 4ed52bfView commit details
Commits on May 6, 2022
-
Auto merge of rust-lang#8778 - sunfishcode:main, r=giraffate
Fix `cast_lossless` to avoid warning on `usize` to `f64` conversion. Previously, the `cast_lossless` lint would issue a warning on code that converted a `usize` value to `f64`, on 32-bit targets. `usize` to `f64` is a lossless cast on 32-bit targets, however there is no corresponding `f64::from` that takes a `usize`, so `cast_lossless`'s suggested replacement does not compile. This PR disables the lint in the case of casting from `usize` or `isize`. Fixes rust-lang#3689. changelog: [`cast_lossless`] no longer gives wrong suggestion on usize,isize->f64
Configuration menu - View commit details
-
Copy full SHA for 5dad517 - Browse repository at this point
Copy the full SHA 5dad517View commit details -
Suggest -Zunpretty=ast-tree instead of -Zast-json
-Zast-json is being removed shortly: rust-lang#85993. ast-tree does essentially the same thing, and still works today even before that PR lands.
Configuration menu - View commit details
-
Copy full SHA for 677b38c - Browse repository at this point
Copy the full SHA 677b38cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2aa63c9 - Browse repository at this point
Copy the full SHA 2aa63c9View commit details -
Auto merge of rust-lang#8792 - jyn514:remove-ast-json, r=flip1995
Suggest -Zunpretty=ast-tree instead of -Zast-json -Zast-json is being removed shortly: rust-lang#85993. ast-tree does essentially the same thing, and still works today even before that PR lands. changelog: none
Configuration menu - View commit details
-
Copy full SHA for bbe6e94 - Browse repository at this point
Copy the full SHA bbe6e94View commit details -
Auto merge of rust-lang#8763 - arieluy:manual_range_contains, r=xFrednet
Support negative ints in manual_range_contains fixes: rust-lang#8721 changelog: Fixes issue where ranges containing ints with different signs would be incorrect due to comparing as unsigned.
Configuration menu - View commit details
-
Copy full SHA for 1594e98 - Browse repository at this point
Copy the full SHA 1594e98View commit details -
Configuration menu - View commit details
-
Copy full SHA for 91a822c - Browse repository at this point
Copy the full SHA 91a822cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 905a951 - Browse repository at this point
Copy the full SHA 905a951View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5d0ca74 - Browse repository at this point
Copy the full SHA 5d0ca74View commit details -
use def_span and def_kind queries instead of calling tcx.hir() methods
Signed-off-by: Miguel Guarniz <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c09778d - Browse repository at this point
Copy the full SHA c09778dView commit details -
Auto merge of rust-lang#8793 - Alexendoo:dev-lint-extra-args, r=xFrednet
Pass through extra args in `cargo dev lint` changelog: Pass through extra args in `cargo dev lint` Lets you pass some useful flags through, like `-A/W/etc`, `--fix`, `--force-warn`
Configuration menu - View commit details
-
Copy full SHA for 43756b6 - Browse repository at this point
Copy the full SHA 43756b6View commit details -
Rollup merge of rust-lang#96557 - nbdd0121:const, r=oli-obk
Allow inline consts to reference generic params Tracking issue: rust-lang#76001 The RFC says that inline consts cannot reference to generic parameters (for now), same as array length expressions. And expresses that it's desirable for it to reference in-scope generics, when array length expressions gain that feature as well. However it is possible to implement this for inline consts before doing this for all anon consts, because inline consts are only used as values and they won't be used in the type system. So we can have: ```rust fn foo<T>() { let x = [4i32; std::mem::size_of::<T>()]; // NOT ALLOWED (for now) let x = const { std::mem::size_of::<T>() }; // ALLOWED with this PR! let x = [4i32; const { std::mem::size_of::<T>() }]; // NOT ALLOWED (for now) } ``` This would make inline consts super useful for compile-time checks and assertions: ```rust fn assert_zst<T>() { const { assert!(std::mem::size_of::<T>() == 0) }; } ``` This would create an error during monomorphization when `assert_zst` is instantiated with non-ZST `T`s. A error during mono might sound scary, but this is exactly what a "desugared" inline const would do: ```rust fn assert_zst<T>() { struct F<T>(T); impl<T> F<T> { const V: () = assert!(std::mem::size_of::<T>() == 0); } let _ = F::<T>::V; } ``` It should also be noted that the current inline const implementation can already reference the type params via type inference, so this resolver-level restriction is not any useful either: ```rust fn foo<T>() -> usize { let (_, size): (PhantomData<T>, usize) = const { const fn my_size_of<T>() -> (PhantomData<T>, usize) { (PhantomData, std::mem::size_of::<T>()) } my_size_of() }; size } ``` ```@rustbot``` label: F-inline_const
Configuration menu - View commit details
-
Copy full SHA for 13e8ace - Browse repository at this point
Copy the full SHA 13e8aceView commit details
Commits on May 7, 2022
-
Auto merge of rust-lang#96531 - kckeiks:remove-item-like-visitor-from…
…-rustc-typeck, r=cjgillot Remove ItemLikeVisitor impls from rustc_typeck Issue rust-lang#95004 cc `@cjgillot`
Configuration menu - View commit details
-
Copy full SHA for dd6ee7f - Browse repository at this point
Copy the full SHA dd6ee7fView commit details -
Lint for significant drops who may have surprising lifetimes #1
author Preston From <[email protected]> 1645164142 -0600 committer Preston From <[email protected]> 1650005351 -0600
Configuration menu - View commit details
-
Copy full SHA for 41c7e4d - Browse repository at this point
Copy the full SHA 41c7e4dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8d85889 - Browse repository at this point
Copy the full SHA 8d85889View commit details -
Auto merge of rust-lang#8794 - smoelius:fix-8759, r=llogiq
Address `unnecessary_to_owned` false positive My proposed fix for rust-lang#8759 is to revise the conditions that delineate `redundant_clone` and `unnecessary_to_owned`: ```rust // Only flag cases satisfying at least one of the following three conditions: // * the referent and receiver types are distinct // * the referent/receiver type is a copyable array // * the method is `Cow::into_owned` // This restriction is to ensure there is no overlap between `redundant_clone` and this // lint. It also avoids the following false positive: // rust-lang/rust-clippy#8759 // Arrays are a bit of a corner case. Non-copyable arrays are handled by // `redundant_clone`, but copyable arrays are not. ``` This change causes a few cases that were previously flagged by `unnecessary_to_owned` to no longer be flagged. But one could argue those cases would be better handled by `redundant_clone`. Closes rust-lang#8759 changelog: none
Configuration menu - View commit details
-
Copy full SHA for 9c78883 - Browse repository at this point
Copy the full SHA 9c78883View commit details -
Track if a where bound comes from a impl Trait desugar
With rust-lang#93803 `impl Trait` function arguments get desugared to hidden where bounds. However, Clippy needs to know if a bound was originally a impl Trait or an actual bound. This adds a field to the `WhereBoundPredicate` struct to keep track of this information during HIR lowering.
Configuration menu - View commit details
-
Copy full SHA for bca3d8a - Browse repository at this point
Copy the full SHA bca3d8aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 03960eb - Browse repository at this point
Copy the full SHA 03960ebView commit details
Commits on May 8, 2022
-
Auto merge of rust-lang#94206 - PrestonFrom:significant_drop, r=flip1995
Create clippy lint against unexpectedly late drop for temporaries in match scrutinee expressions A new clippy lint for issue 93883 (rust-lang#93883). Relies on a new trait in `marker` (called `SignificantDrop` to enable linting), which is why this PR is for the rust-lang repo and not the clippy repo. changelog: new lint [`significant_drop_in_scrutinee`]
Configuration menu - View commit details
-
Copy full SHA for 6d03789 - Browse repository at this point
Copy the full SHA 6d03789View commit details -
Configuration menu - View commit details
-
Copy full SHA for bdfea1c - Browse repository at this point
Copy the full SHA bdfea1cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 597f61b - Browse repository at this point
Copy the full SHA 597f61bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 21e4765 - Browse repository at this point
Copy the full SHA 21e4765View commit details -
Auto merge of rust-lang#96770 - flip1995:fix-trait-type-in-bounds, r=…
…cjgillot Track if a where bound comes from a impl Trait desugar With rust-lang#93803 `impl Trait` function arguments get desugared to hidden where bounds. However, Clippy needs to know if a bound was originally a `impl Trait` or an actual bound. This adds a field to the `WhereBoundPredicate` struct to keep track of this information during AST->HIR lowering. r? `@cjgillot` cc `@estebank` (as the reviewer of rust-lang#93803)
Configuration menu - View commit details
-
Copy full SHA for 1d018ce - Browse repository at this point
Copy the full SHA 1d018ceView commit details -
Auto merge of rust-lang#8802 - smoelius:allow-expect-unwrap-in-tests,…
… r=llogiq Optionally allow `expect` and `unwrap` in tests This addresses rust-lang#1015, except it makes the new behavior optional. The reason for the msrv-related changes is as follows. Rather than expand `check_methods` list of arguments, it seemed easier to make `check_methods` a method of `Methods`, so that `check_methods` could access `Methods`' fields. `check_methods` had an `msrv` parameter, which I consequently made a field of `Methods`. But, to avoid adding a lifetime parameter to `Methods`, I made the field type `Option<RustcVersion>` instead of the parameter's existing type, `Option<&RustcVersion>`. This seemed sensible since `RustcVersion` implements `Copy`. But this broke a lot of code that expected an `Option<&RustcVersion>` or `&Option<RustcVersion>`. I changed all of those occurrences to `Option<RustcVersion>`. IMHO, the code is better as a result of these changes, though. The msrv-related changes are in their own commit to (hopefully) ease review. Closes rust-lang#1015 changelog: optionally allow `expect` and `unwrap` in tests r? `@llogiq`
Configuration menu - View commit details
-
Copy full SHA for 4667198 - Browse repository at this point
Copy the full SHA 4667198View commit details
Commits on May 9, 2022
-
Auto merge of rust-lang#95542 - xFrednet:rfc-2383-expect-query, r=wes…
…leywiser Support tool lints with the `#[expect]` attribute (RFC 2383) This PR fixes the ICE rust-lang#94953 by making the assert for converted expectation IDs conditional. Additionally, it moves the lint expectation check into a separate query to support rustdoc and other tools. On the way, I've also added some tests to ensure that the attribute works for Clippy and rustdoc lints. The number of changes comes from the long test file. This may look like a monster PR, this may smell like a monster PR and this may be a monster PR, but it's a harmless monster. 🦕 --- Closes: rust-lang#94953 cc: rust-lang#85549 r? `@wesleywiser` cc: `@rust-lang/rustdoc`
Configuration menu - View commit details
-
Copy full SHA for 670bc53 - Browse repository at this point
Copy the full SHA 670bc53View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5e4f092 - Browse repository at this point
Copy the full SHA 5e4f092View commit details -
Configuration menu - View commit details
-
Copy full SHA for c9d88ef - Browse repository at this point
Copy the full SHA c9d88efView commit details -
Configuration menu - View commit details
-
Copy full SHA for 47e9afa - Browse repository at this point
Copy the full SHA 47e9afaView commit details -
Auto merge of rust-lang#8805 - Alexendoo:let-chain-docs, r=flip1995
Recommend let chains over if_chain in docs Switches over bit_mask.rs to let chains in order to create a nice example While the rustfmt thing isn't resolved yet, my rust-analyzer isn't a fan of large `if_chains!`s, it stops giving me hover info and such after some number of if statements changelog: none
Configuration menu - View commit details
-
Copy full SHA for c3f3c58 - Browse repository at this point
Copy the full SHA c3f3c58View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0f1544f - Browse repository at this point
Copy the full SHA 0f1544fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 993b401 - Browse repository at this point
Copy the full SHA 993b401View commit details -
Auto merge of rust-lang#8797 - xFrednet:0000-expect-a-playground, r=f…
…lip1995 Replace `#[allow]` with `#[expect]` in Clippy Hey `@rust-lang/clippy,` `@Alexendoo,` `@dswij,` I'm currently working on the expect attribute as defined in [Rust RFC 2383](https://rust-lang.github.io/rfcs/2383-lint-reasons.html). With that, an `#[allow]` attribute can be replaced with a `#[expect]` attribute that suppresses the lint, but also emits a warning, if the lint isn't emitted in the expected scope. With this PR I would like to test the attribute on a project scale and Clippy obviously came to mind. This PR replaces (almost) all `#[allow]` attributes in `clippy_utils` and `clippy_lints` with the `#[expect]` attribute. I was also able to remove some allows since, the related FPs have been fixed 🎉. My question is now, are there any concerns regarding this? It's still okay to add normal `#[allow]` attributes, I see the need to nit-pick about that in new PRs, unless it's actually a FP. Also, I would not recommend using `#[expect]` in tests, as changes to a lint could the trigger the expect attribute in other files. Additionally, I've noticed that Clippy has a bunch of `#[allow(clippy::too_many_lines)]` attributes. Should we maybe allow the lint all together or increase the threshold setting? To me, it seems like we mostly just ignore it in our code. 😅 🙃 --- changelog: none r? `@flip1995` (I've requested you for now, since you're also helping with reviewing the expect implementation. You are welcome to delegate this PR, even if it should be a simple review 🙃 )
Configuration menu - View commit details
-
Copy full SHA for aa03344 - Browse repository at this point
Copy the full SHA aa03344View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6edf0b4 - Browse repository at this point
Copy the full SHA 6edf0b4View commit details -
Auto merge of rust-lang#8809 - Alexendoo:metadata-collection-expect, …
…r=xFrednet Ignore unfulfilled_lint_expectations in metadata collection r? `@xFrednet` When metadata collection is enabled the regular early/late pass registrations are skipped, which the `#[expect()]`s were no fan of: https://github.com/rust-lang/rust-clippy/runs/6356675328?check_suite_focus=true changelog: none
Configuration menu - View commit details
-
Copy full SHA for 77effb7 - Browse repository at this point
Copy the full SHA 77effb7View commit details
Commits on May 10, 2022
-
Configuration menu - View commit details
-
Copy full SHA for fe84ff3 - Browse repository at this point
Copy the full SHA fe84ff3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 107ee40 - Browse repository at this point
Copy the full SHA 107ee40View commit details -
Configuration menu - View commit details
-
Copy full SHA for feb6d8c - Browse repository at this point
Copy the full SHA feb6d8cView commit details -
Auto merge of rust-lang#8769 - yonip23:8719, r=xFrednet
introduce rc_clone_in_vec_init lint Closes rust-lang#8719 changelog: Introduce [`rc_clone_in_vec_init`] lint
Configuration menu - View commit details
-
Copy full SHA for 1a11a49 - Browse repository at this point
Copy the full SHA 1a11a49View commit details -
Auto merge of rust-lang#8796 - nsunderland1:master, r=giraffate
New lint: [`derive_partial_eq_without_eq`] Introduces a new lint, [`derive_partial_eq_without_eq`]. See: rust-lang#1781 (doesn't close it though). changelog: add lint [`derive_partial_eq_without_eq`]
Configuration menu - View commit details
-
Copy full SHA for d422baa - Browse repository at this point
Copy the full SHA d422baaView commit details -
Configuration menu - View commit details
-
Copy full SHA for aaf87c3 - Browse repository at this point
Copy the full SHA aaf87c3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1926217 - Browse repository at this point
Copy the full SHA 1926217View commit details -
Configuration menu - View commit details
-
Copy full SHA for 631b4ee - Browse repository at this point
Copy the full SHA 631b4eeView commit details -
Configuration menu - View commit details
-
Copy full SHA for f3e01c4 - Browse repository at this point
Copy the full SHA f3e01c4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 554dc41 - Browse repository at this point
Copy the full SHA 554dc41View commit details
Commits on May 11, 2022
-
Configuration menu - View commit details
-
Copy full SHA for cf8ea64 - Browse repository at this point
Copy the full SHA cf8ea64View commit details -
Use the traits added to the Rust 2021 Edition prelude
Follow up rust-lang#96861. This PR uses the traits added to the Rust 2021 Edition prelude. > The `TryInto`, `TryFrom` and `FromIterator` traits are now part of the prelude. https://doc.rust-lang.org/edition-guide/rust-2021/prelude.html
Configuration menu - View commit details
-
Copy full SHA for ae0216d - Browse repository at this point
Copy the full SHA ae0216dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3182532 - Browse repository at this point
Copy the full SHA 3182532View commit details -
Auto merge of rust-lang#8726 - Serial-ATA:issue-8723, r=dswij,xFrednet
Fix `match_single_binding` suggestion for assign expressions changelog: Fix suggestion for assign expressions in [`match_single_binding`] closes: rust-lang#8723
Configuration menu - View commit details
-
Copy full SHA for 6889d09 - Browse repository at this point
Copy the full SHA 6889d09View commit details -
Configuration menu - View commit details
-
Copy full SHA for 344888a - Browse repository at this point
Copy the full SHA 344888aView commit details -
Auto merge of rust-lang#8818 - koic:use_rust_2021_prelude, r=flip1995
Use the traits added to the Rust 2021 Edition prelude Follow up rust-lang#96861. This PR uses the traits added to the Rust 2021 Edition prelude. > The `TryInto`, `TryFrom` and `FromIterator` traits are now part of the prelude. https://doc.rust-lang.org/edition-guide/rust-2021/prelude.html --- changelog: none
Configuration menu - View commit details
-
Copy full SHA for a3d1f28 - Browse repository at this point
Copy the full SHA a3d1f28View commit details -
Configuration menu - View commit details
-
Copy full SHA for a791205 - Browse repository at this point
Copy the full SHA a791205View commit details
Commits on May 12, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 9e66f2d - Browse repository at this point
Copy the full SHA 9e66f2dView commit details -
Configuration menu - View commit details
-
Copy full SHA for dc23b5d - Browse repository at this point
Copy the full SHA dc23b5dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8708a26 - Browse repository at this point
Copy the full SHA 8708a26View commit details -
Auto merge of rust-lang#95562 - lcnr:attr-no-encode, r=davidtwco
don't encode only locally used attrs Part of rust-lang/compiler-team#505. We now filter builtin attributes before encoding them in the crate metadata in case they should only be used in the local crate. To prevent accidental misuse `get_attrs` now requires the caller to state which attribute they are interested in. For places where that isn't trivially possible, I've added a method `fn get_attrs_unchecked` which I intend to remove in a followup PR. After this pull request landed, we can then slowly move all attributes to only be used in the local crate while being certain that we don't accidentally try to access them from extern crates. cc rust-lang#94963 (comment)
Configuration menu - View commit details
-
Copy full SHA for 7161a70 - Browse repository at this point
Copy the full SHA 7161a70View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0def44a - Browse repository at this point
Copy the full SHA 0def44aView commit details -
Configuration menu - View commit details
-
Copy full SHA for ed3744b - Browse repository at this point
Copy the full SHA ed3744bView commit details -
Auto merge of rust-lang#8799 - Alexendoo:lintcheck-common, r=giraffate
Some lintcheck cleanup A grab bag of smaller changes: Panics if a crate source isn't valid, and fixes the `ryu` crate entry so it's picked up. Took me a while to realise why I couldn't do `cargo lintcheck --only ryu` 😅 Parses messages with `cargo_metadata`, this catches a few more lints that were ignored because the message had an [expansion field](https://docs.rs/cargo_metadata/latest/cargo_metadata/diagnostic/struct.DiagnosticSpanMacroExpansion.html) that contained a path pointing into `.../.toolchains/...`. It also no longer emits some log lines with `null` as the column It also merges the `run_clippy_lint` invocations and splits `LintcheckConfig` out into its own file changelog: none
Configuration menu - View commit details
-
Copy full SHA for b54f446 - Browse repository at this point
Copy the full SHA b54f446View commit details
Commits on May 13, 2022
-
Tweak some words improved representation
This PR has implemented improved representation. - Use "lib" instead of "lifb" - Use "triggered" instead of "triggere" - Use "blacklisted_name" instead of "blackisted_name" - Use "stabilization" instead of "stabilisation" - Use "behavior" instead of "behaviour" - Use "target" instead of "tartet" - Use "checked_add" instead of "chcked_add" - Use "anti-pattern" instead of "antipattern" - Use "suggestion" instead of "suggesttion" - Use "example" instead of "exampel" - Use "Cheat Sheet" instead of "Cheatsheet"
Configuration menu - View commit details
-
Copy full SHA for 4e5f69c - Browse repository at this point
Copy the full SHA 4e5f69cView commit details -
Auto merge of rust-lang#8825 - ydah:fix_spelling, r=giraffate
Tweak some words improved representation Hello! Thank you for this awesome project! This PR has implemented improved representation. - Use "lib" instead of "lifb" - Use "triggered" instead of "triggere" - Use "blacklisted_name" instead of "blackisted_name" - Use "stabilization" instead of "stabilisation" - Use "behavior" instead of "behaviour" - Use "target" instead of "tartet" - Use "checked_add" instead of "chcked_add" - Use "anti-pattern" instead of "antipattern" - Use "suggestion" instead of "suggesttion" - Use "example" instead of "exampel" - Use "Cheat Sheet" instead of "Cheatsheet" --- changelog: none
Configuration menu - View commit details
-
Copy full SHA for 01d75b1 - Browse repository at this point
Copy the full SHA 01d75b1View commit details -
Configuration menu - View commit details
-
Copy full SHA for ad7338e - Browse repository at this point
Copy the full SHA ad7338eView commit details -
Auto merge of rust-lang#8813 - evantypanski:redundant_alloc_fat_ptr, …
…r=Alexendoo Fix redundant_allocation warning for Rc<Box<str>> changelog: [`redundant_allocation`] Fixes rust-lang#8604 Fixes false positives where a fat pointer with `str` type was made thin by another allocation, but that thinning allocation was marked as redundant
Configuration menu - View commit details
-
Copy full SHA for 2038084 - Browse repository at this point
Copy the full SHA 2038084View commit details -
Signed-off-by: Miguel Guarniz <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b622f56 - Browse repository at this point
Copy the full SHA b622f56View commit details -
Configuration menu - View commit details
-
Copy full SHA for cc0607a - Browse repository at this point
Copy the full SHA cc0607aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6dab55c - Browse repository at this point
Copy the full SHA 6dab55cView commit details
Commits on May 14, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 1f79a44 - Browse repository at this point
Copy the full SHA 1f79a44View commit details -
Auto merge of rust-lang#96883 - jackh726:early-binder-2, r=oli-obk
Add EarlyBinder Chalk has no concept of `Param` (https://github.com/rust-lang/chalk/blob/e0ade19d139bc784384acc6736cd960c91dd55a1/chalk-ir/src/lib.rs#L579) or `ReEarlyBound` (https://github.com/rust-lang/chalk/blob/e0ade19d139bc784384acc6736cd960c91dd55a1/chalk-ir/src/lib.rs#L1308). Everything is just "bound" - the equivalent of rustc's late-bound. It's not completely clear yet whether to move everything to the same time of binder in rustc or add `Param` and `ReEarlyBound` in Chalk. Either way, tracking when we have or haven't already substituted out these in rustc can be helpful. As a first step, I'm just adding a `EarlyBinder` newtype that is required to call `subst`. I also add a couple "transparent" `bound_*` wrappers around a couple query that are often immediately substituted. r? `@nikomatsakis`
Configuration menu - View commit details
-
Copy full SHA for 198c70d - Browse repository at this point
Copy the full SHA 198c70dView commit details
Commits on May 15, 2022
-
Configuration menu - View commit details
-
Copy full SHA for a30587e - Browse repository at this point
Copy the full SHA a30587eView commit details -
Auto merge of rust-lang#8832 - Alexendoo:duplicate-mod, r=Manishearth
Add `duplicate_mod` lint Inspired by rust-lang#8827, warns if there's a single file that is loaded by more than one `mod` item ```rust,ignore // lib.rs mod a; mod b; ``` ```rust,ignore // a.rs #[path = "./b.rs"] mod b; ``` It adds a `canonicalize` call per `mod file;` encountered, which I don't think should be too heavy Integration tests with common modules, e.g. [`test_utils`](https://github.com/rust-lang/rust-clippy/tree/2038084cf2253b57cf8b405ab000a92b68346f43/tests/test_utils) doesn't trigger it as each test is compiled separately, however I couldn't figure out a good way to add a test for that changelog: Add [`duplicate_mod`] lint
Configuration menu - View commit details
-
Copy full SHA for c10bfae - Browse repository at this point
Copy the full SHA c10bfaeView commit details -
Configuration menu - View commit details
-
Copy full SHA for b81d703 - Browse repository at this point
Copy the full SHA b81d703View commit details -
Configuration menu - View commit details
-
Copy full SHA for f112e4d - Browse repository at this point
Copy the full SHA f112e4dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 50eada1 - Browse repository at this point
Copy the full SHA 50eada1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4fd2968 - Browse repository at this point
Copy the full SHA 4fd2968View commit details -
Configuration menu - View commit details
-
Copy full SHA for f7378da - Browse repository at this point
Copy the full SHA f7378daView commit details -
Auto merge of rust-lang#8621 - Jarcho:eval_order_dependence_4637, r=J…
…archo Rename `eval_order_dependence` to `mixed_read_write_expression`, move to nursery As per the [reference](https://doc.rust-lang.org/1.51.0/reference/expressions.html#evaluation-order-of-operands) evaluation order is now defined. I'm pretty sure rust always compiled with this evaluation order anyways so there's no reason the put an msrv limit on the lint. changelog: Rename `eval_order_dependence` to `mixed_read_write_expression`, move to nursery
Configuration menu - View commit details
-
Copy full SHA for 1c0a61e - Browse repository at this point
Copy the full SHA 1c0a61eView commit details -
Configuration menu - View commit details
-
Copy full SHA for f1574cc - Browse repository at this point
Copy the full SHA f1574ccView commit details -
Auto merge of rust-lang#8699 - Jarcho:vec_init_then_push_7071, r=dswi…
…j,xFrednet Don't lint `vec_init_then_push` when further extended fixes rust-lang#7071 This will still lint when a larger number of pushes are done (four currently). The exact number could be debated, but this is more readable then a sequence of pushes so it shouldn't be too large. changelog: Don't lint `vec_init_then_push` when further extended. changelog: Remove `mut` binding from `vec_init_then_push` when possible.
Configuration menu - View commit details
-
Copy full SHA for 6ec7359 - Browse repository at this point
Copy the full SHA 6ec7359View commit details
Commits on May 16, 2022
-
Auto merge of rust-lang#8761 - tamaroning:fix_8505, r=Jarcho
`undocumented_unsafe_blocks` does not trigger on unsafe trait impls Closes rust-lang#8505 changelog: This lint checks unsafe impls NOT from macro expansions and checks ones in macro declarations. ~~`unsafe impl`s from macro invocations don't trigger the lint for now.~~ ~~This lint checks unsafe impls from/not from macro expansions~~
Configuration menu - View commit details
-
Copy full SHA for a1632ff - Browse repository at this point
Copy the full SHA a1632ffView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0f30866 - Browse repository at this point
Copy the full SHA 0f30866View commit details -
Configuration menu - View commit details
-
Copy full SHA for c649d4e - Browse repository at this point
Copy the full SHA c649d4eView commit details -
Auto merge of rust-lang#8752 - Serial-ATA:improve-filtering, r=xFrednet
Add version filtering option to the lint list I'm no web dev, so I don't know if this is the best execution 😄. Here's how it looks: ![Desktop](https://user-images.githubusercontent.com/69764315/165403602-9e39fe0f-6a96-46cb-ba51-8b035e74cce4.gif) And on mobile: ![Mobile](https://user-images.githubusercontent.com/69764315/165403908-fc4a0051-2ed4-48a3-b45b-b261f49ce259.png) I've split this into two commits, in the second one I moved the JS into its own file to make it easier to work on. Is that alright? And if so, could the same thing be done to the css? changelog: none cc: rust-lang#7958, `@repi` r? `@xFrednet`
Configuration menu - View commit details
-
Copy full SHA for 6e86ab0 - Browse repository at this point
Copy the full SHA 6e86ab0View commit details -
Auto merge of rust-lang#8835 - Jarcho:let_unit_ice, r=llogiq
Fix ICE in `let_unit_value` when calling a static or const callable type fixes rust-lang#8821 changelog: Fix ICE in `let_unit_value` when calling a static or const callable type
Configuration menu - View commit details
-
Copy full SHA for 219d702 - Browse repository at this point
Copy the full SHA 219d702View commit details
Commits on May 17, 2022
-
Configuration menu - View commit details
-
Copy full SHA for d7a6654 - Browse repository at this point
Copy the full SHA d7a6654View commit details -
Auto merge of rust-lang#8814 - yonip23:add-suggestion-to-rc-clone-in-…
…vec-init, r=xFrednet add suggestions to rc_clone_in_vec_init A followup to rust-lang/rust-clippy#8769 I also switch the order of the 2 suggestions, since the loop initialization one is probably the common case. `@xFrednet` I'm not letting you guys rest for a minute 😅 changelog: add suggestions to [`rc_clone_in_vec_init`]
Configuration menu - View commit details
-
Copy full SHA for d901079 - Browse repository at this point
Copy the full SHA d901079View commit details -
Auto merge of rust-lang#96825 - kckeiks:remove-item-like-visitor-trai…
…t, r=cjgillot Retire `ItemLikeVisitor` trait Issue rust-lang#95004 cc `@cjgillot`
Configuration menu - View commit details
-
Copy full SHA for 7062eb4 - Browse repository at this point
Copy the full SHA 7062eb4View commit details -
Auto merge of rust-lang#97012 - oli-obk:🦀_intrinsics, r=davidtwco
Add a query for checking whether a function is an intrinsic. work towards rust-lang#93145 This will reduce churn when we add more ways to declare intrinsics r? `@scottmcm`
Configuration menu - View commit details
-
Copy full SHA for e9f3cdf - Browse repository at this point
Copy the full SHA e9f3cdfView commit details -
Rollup merge of rust-lang#97079 - SparrowLii:successors, r=lcnr
Change `Successors` to `impl Iterator<Item = BasicBlock>` This PR fixes the FIXME in `compiler\rustc_middle\src\mir\mod.rs`. This can omit several `&`, `*` or `cloned` operations on Successros' generated elements
Configuration menu - View commit details
-
Copy full SHA for ae9d727 - Browse repository at this point
Copy the full SHA ae9d727View commit details -
Auto merge of rust-lang#97111 - JohnTitor:rollup-x3vjf6u, r=JohnTitor
Rollup of 7 pull requests Successful merges: - rust-lang#96329 (Add a couple tests for rust-lang#90887 fixes) - rust-lang#97009 (Allow `unused_macro_rules` in path tests) - rust-lang#97075 (Add regression test for rust-lang#81804) - rust-lang#97079 (Change `Successors` to `impl Iterator<Item = BasicBlock>`) - rust-lang#97080 (remove the `RelateResultCompare` trait) - rust-lang#97093 (Migrate `maybe_recover_from_bad_type_plus` diagnostic) - rust-lang#97102 (Update function pointer call error message) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Configuration menu - View commit details
-
Copy full SHA for acc822a - Browse repository at this point
Copy the full SHA acc822aView commit details -
Configuration menu - View commit details
-
Copy full SHA for b4c3f0f - Browse repository at this point
Copy the full SHA b4c3f0fView commit details
Commits on May 18, 2022
-
Auto merge of rust-lang#8807 - Jarcho:cmp_owned, r=giraffate
Fix `cmp_owned` on copy types fixes rust-lang#8803 fixes rust-lang#7365 changelog: Don't lint `cmp_owned` on `From::from` for copy types
Configuration menu - View commit details
-
Copy full SHA for bf2e631 - Browse repository at this point
Copy the full SHA bf2e631View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5647257 - Browse repository at this point
Copy the full SHA 5647257View commit details -
Configuration menu - View commit details
-
Copy full SHA for 27fec01 - Browse repository at this point
Copy the full SHA 27fec01View commit details -
Auto merge of rust-lang#8823 - smoelius:unknown-field, r=xFrednet
Improve "unknown field" error messages Fixes rust-lang#8806 Sample output: ``` error: error reading Clippy's configuration file `/home/smoelius/github/smoelius/rust-clippy/clippy.toml`: unknown field `foobar`, expected one of allow-expect-in-tests enable-raw-pointer-heuristic-for-send standard-macro-braces allow-unwrap-in-tests enforced-import-renames third-party allowed-scripts enum-variant-name-threshold too-large-for-stack array-size-threshold enum-variant-size-threshold too-many-arguments-threshold avoid-breaking-exported-api literal-representation-threshold too-many-lines-threshold await-holding-invalid-types max-fn-params-bools trivial-copy-size-limit blacklisted-names max-include-file-size type-complexity-threshold cargo-ignore-publish max-struct-bools unreadable-literal-lint-fractions cognitive-complexity-threshold max-suggested-slice-pattern-length upper-case-acronyms-aggressive cyclomatic-complexity-threshold max-trait-bounds vec-box-size-threshold disallowed-methods msrv verbose-bit-mask-threshold disallowed-types pass-by-value-size-limit warn-on-all-wildcard-imports doc-valid-idents single-char-binding-names-threshold at line 1 column 1 ``` You can test this by (say) adding `foobar = 42` to Clippy's root `clippy.toml` file, and running `cargo run --bin cargo-clippy`. Note that, to get the terminal width, this PR adds `termize` as a dependency to `cargo-clippy`. However, `termize` is also [how `rustc_errors` gets the terminal width](https://github.com/rust-lang/rust/blob/481db40311cdd241ae4d33f34f2f75732e44d8e8/compiler/rustc_errors/src/emitter.rs#L1607). So, hopefully, this is not a dealbreaker. r? `@xFrednet` changelog: Enhancements: the "unknown field" error messages for config files now wraps the field names.
Configuration menu - View commit details
-
Copy full SHA for b6ad6fc - Browse repository at this point
Copy the full SHA b6ad6fcView commit details -
Auto merge of rust-lang#96863 - SparrowLii:let, r=michaelwoerister
use `hir::Let` in `hir::Guard::IfLet` This PR fixes the FIXME about using `hir::Let` in `hir::Guard::IfLet`
Configuration menu - View commit details
-
Copy full SHA for 01421e0 - Browse repository at this point
Copy the full SHA 01421e0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8aae26b - Browse repository at this point
Copy the full SHA 8aae26bView commit details -
Configuration menu - View commit details
-
Copy full SHA for e05da56 - Browse repository at this point
Copy the full SHA e05da56View commit details -
Auto merge of rust-lang#8839 - Serial-ATA:copy-lint-name, r=xFrednet
Add copy lint name button changelog: Documentation: Add a *copy lint name*-button to Clippy's lint list closes rust-lang#7959
Configuration menu - View commit details
-
Copy full SHA for 6f8d18f - Browse repository at this point
Copy the full SHA 6f8d18fView commit details
Commits on May 19, 2022
-
Configuration menu - View commit details
-
Copy full SHA for db41df1 - Browse repository at this point
Copy the full SHA db41df1View commit details -
Configuration menu - View commit details
-
Copy full SHA for b787f4c - Browse repository at this point
Copy the full SHA b787f4cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 944e1bb - Browse repository at this point
Copy the full SHA 944e1bbView commit details -
Auto merge of rust-lang#8838 - tamaroning:fix_dbg, r=Jarcho,xFrednet
[dbg_macro] tolerates use of `dbg!` in items which have `#[cfg(test)]` attribute fix: rust-lang#8758 changelog: [dbg_macro] tolerates use of `dbg!` in items with `#[cfg(test)]` attribute
Configuration menu - View commit details
-
Copy full SHA for ea96091 - Browse repository at this point
Copy the full SHA ea96091View commit details -
Auto merge of rust-lang#8840 - xFrednet:0000-mini-changelog-update, r…
…=llogiq Mini changelog update for Rust 1.61.0 I'll do the full release and sync tomorrow, as I sadly don't have the time today. This is a quick update to ensure that Rust's changelog will link to the correct section in our changelog. The change is according to [our docs](https://github.com/rust-lang/rust-clippy/blob/8751e47bae68f6bf7ec833dbd42bde51a74f1a65/book/src/development/infrastructure/release.md#update-changelogmd) changelog: none
Configuration menu - View commit details
-
Copy full SHA for 879cd37 - Browse repository at this point
Copy the full SHA 879cd37View commit details -
Auto merge of rust-lang#8841 - Serial-ATA:remove-code-block, r=xFrednet
Remove code block from `pub_enum_variant_names` changelog: none Just noticed this empty code block that no other lint has 😄. ![old](https://user-images.githubusercontent.com/69764315/169314573-098ce938-8a4c-4451-afd7-7b082823a0de.png) r? `@xFrednet`
Configuration menu - View commit details
-
Copy full SHA for 6f26383 - Browse repository at this point
Copy the full SHA 6f26383View commit details
Commits on May 20, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 5730fd4 - Browse repository at this point
Copy the full SHA 5730fd4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4e6cf00 - Browse repository at this point
Copy the full SHA 4e6cf00View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5b72632 - Browse repository at this point
Copy the full SHA 5b72632View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8283238 - Browse repository at this point
Copy the full SHA 8283238View commit details -
Auto merge of rust-lang#8852 - Alexendoo:indirect-disallowed-methods,…
… r=Manishearth Lint indirect usages in `disallowed_methods` Fixes rust-lang#8849 changelog: Lint indirect usages in [`disallowed_methods`]
Configuration menu - View commit details
-
Copy full SHA for f26f117 - Browse repository at this point
Copy the full SHA f26f117View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7842dbc - Browse repository at this point
Copy the full SHA 7842dbcView commit details -
Auto merge of rust-lang#8856 - xFrednet:rustup, r=Manishearth,Alexendoo
Rustup `@rust-lang/clippy,` `@Jarcho,` `@dswij,` `@Alexendoo.` Could someone review this? It should be pretty straight forward since it's just a sync. I think it's also fine if either one of `@Jarcho,` `@dswij,` `@Alexendoo` approves this, as these are usually not reviewed. I just want to make sure that I didn't break something obvious 🙃 It should be enough to look at the merge commit 🙃 changelog: none changelog: move [`significant_drop_in_scrutinee`] to `suspicious`
Configuration menu - View commit details
-
Copy full SHA for b312ad7 - Browse repository at this point
Copy the full SHA b312ad7View commit details
Commits on May 21, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 13cc27b - Browse repository at this point
Copy the full SHA 13cc27bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6e87c24 - Browse repository at this point
Copy the full SHA 6e87c24View commit details