-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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 11 pull requests #82201
Rollup of 11 pull requests #82201
Commits on Dec 12, 2020
-
Add 'consider using' message to overflowing_literals
Ironically, the overflowing_literals handler for binary or hex already had this message! You would think it would be the other way around :)
Configuration menu - View commit details
-
Copy full SHA for d00ca11 - Browse repository at this point
Copy the full SHA d00ca11View commit details
Commits on Feb 1, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 949b125 - Browse repository at this point
Copy the full SHA 949b125View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5753614 - Browse repository at this point
Copy the full SHA 5753614View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3da25ed - Browse repository at this point
Copy the full SHA 3da25edView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8973f2c - Browse repository at this point
Copy the full SHA 8973f2cView commit details -
Configuration menu - View commit details
-
Copy full SHA for b87e189 - Browse repository at this point
Copy the full SHA b87e189View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7825bf3 - Browse repository at this point
Copy the full SHA 7825bf3View commit details
Commits on Feb 2, 2021
-
Configuration menu - View commit details
-
Copy full SHA for e07cd5b - Browse repository at this point
Copy the full SHA e07cd5bView commit details
Commits on Feb 3, 2021
-
Configuration menu - View commit details
-
Copy full SHA for c8cb90a - Browse repository at this point
Copy the full SHA c8cb90aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0f5e71f - Browse repository at this point
Copy the full SHA 0f5e71fView commit details -
Configuration menu - View commit details
-
Copy full SHA for f2e82af - Browse repository at this point
Copy the full SHA f2e82afView commit details -
Fix file names of flat_map_identity test
This commit fixes the file names of the `flat_map_identity` test. Previously, their names were started with `unnecessary_flat_map` even though the lint rule name is `flat_map_identity`. This inconsistency happened probably because the rule name was changed during the discussion in the PR where this rule was introduced. ref: rust-lang/rust-clippy#4231
Configuration menu - View commit details
-
Copy full SHA for 6396b8f - Browse repository at this point
Copy the full SHA 6396b8fView commit details -
Auto merge of rust-lang#6669 - magurotuna:fix-test-name, r=flip1995
Fix file names of flat_map_identity test This patch fixes the file names of the `flat_map_identity` test. Previously, their names were started with `unnecessary_flat_map` even though the lint rule name is `flat_map_identity`. This inconsistency happened probably because the rule name was changed during the discussion in the PR where this rule was introduced. ref: rust-lang/rust-clippy#4231 changelog: none
Configuration menu - View commit details
-
Copy full SHA for 876ffa4 - Browse repository at this point
Copy the full SHA 876ffa4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 78ef0f2 - Browse repository at this point
Copy the full SHA 78ef0f2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0767a0f - Browse repository at this point
Copy the full SHA 0767a0fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9f7f8b7 - Browse repository at this point
Copy the full SHA 9f7f8b7View commit details
Commits on Feb 4, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 2f8a8d3 - Browse repository at this point
Copy the full SHA 2f8a8d3View commit details -
Auto merge of rust-lang#6646 - nahuakang:for_loops_over_options_or_re…
…sults, r=flip1995 New Lint: Manual Flatten This is a draft PR for [Issue 6564](rust-lang/rust-clippy#6564). r? `@camsteffen` - \[x] Followed [lint naming conventions][lint_naming] - \[x] Added passing UI tests (including committed `.stderr` file) - \[x] `cargo test` passes locally - \[x] Executed `cargo dev update_lints` - \[x] Added lint documentation - \[x] Run `cargo dev fmt` --- *Please write a short comment explaining your change (or "none" for internal only changes)* changelog: Add new lint [`manual_flatten`] to check for loops over a single `if let` expression with `Result` or `Option`.
Configuration menu - View commit details
-
Copy full SHA for 357c6a7 - Browse repository at this point
Copy the full SHA 357c6a7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 233fe11 - Browse repository at this point
Copy the full SHA 233fe11View commit details -
Support free functions in disallowed-methods lint
In other words, support: `disallowed_methods = ["alloc::vec::Vec::new"]` (a free function) in addition to `disallowed_methods = ["alloc::vec::Vec::leak"]` (a method). Improve the documentation to clarify that users must specify the full qualified path for each disallowed function, which can be confusing for reexports. Include an example `clippy.toml`. Simplify the actual lint pass so we can reuse `utils::fn_def_id`.
Configuration menu - View commit details
-
Copy full SHA for 7b7e3ca - Browse repository at this point
Copy the full SHA 7b7e3caView commit details
Commits on Feb 5, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 67d48e1 - Browse repository at this point
Copy the full SHA 67d48e1View commit details -
Use absolute path to Rust repo in ra_setup
This will convert the path to the Rust repo to an absolute path. This is important for the clippy_lints/Cargo.toml file. Otherwise if a relative path is passed, rst-analyzer won't find the Rust repo, because it starts the relative path search from the clippy_lints dir, not the rust-clippy dir where the ra_setup command was run from.
Configuration menu - View commit details
-
Copy full SHA for 79dbf10 - Browse repository at this point
Copy the full SHA 79dbf10View commit details -
Configuration menu - View commit details
-
Copy full SHA for 56f7fbb - Browse repository at this point
Copy the full SHA 56f7fbbView commit details -
Auto merge of rust-lang#6678 - TaKO8Ki:fix-typo, r=flip1995
Fix typo This patch fixes a typo. changelog: none
Configuration menu - View commit details
-
Copy full SHA for 89f266a - Browse repository at this point
Copy the full SHA 89f266aView commit details -
Auto merge of rust-lang#6679 - flip1995:ra_setup_abs_path, r=Manishearth
Use absolute path to Rust repo in ra_setup This will convert the path to the Rust repo to an absolute path. This is important for the clippy_lints/Cargo.toml file. Otherwise if a relative path is passed, rst-analyzer won't find the Rust repo, because it starts the relative path search from the clippy_lints dir, not the rust-clippy dir where the ra_setup command was run from. changelog: none
Configuration menu - View commit details
-
Copy full SHA for a507c27 - Browse repository at this point
Copy the full SHA a507c27View commit details -
Configuration menu - View commit details
-
Copy full SHA for eb9c669 - Browse repository at this point
Copy the full SHA eb9c669View commit details -
Configuration menu - View commit details
-
Copy full SHA for f907986 - Browse repository at this point
Copy the full SHA f907986View commit details -
Configuration menu - View commit details
-
Copy full SHA for 55bfaa1 - Browse repository at this point
Copy the full SHA 55bfaa1View commit details -
Fix let_underscore_drop implements Drop logic
This fixes false positives and false negatives.
Configuration menu - View commit details
-
Copy full SHA for ac5e9c8 - Browse repository at this point
Copy the full SHA ac5e9c8View commit details -
Configuration menu - View commit details
-
Copy full SHA for a9ad492 - Browse repository at this point
Copy the full SHA a9ad492View commit details -
tests: ignore check_that_clippy_has_the_same_major_version_as_rustc()…
… inside the rustc repo. Do not check if clippy version matches rustc version when runnning tests inside the rustc repo. This makes sure that upstream rustc maintainers do not have to deal with our test failing/mismatching versions when the rustc version bump is happening. cc rust-lang#6683
Configuration menu - View commit details
-
Copy full SHA for 93daf27 - Browse repository at this point
Copy the full SHA 93daf27View commit details
Commits on Feb 6, 2021
-
Add new lint
filter_map_identity
This commit adds a new lint named `filter_map_identity`. This lint is the same as `flat_map_identity` except that it checks for `filter_map`. Closes rust-lang#6643
Configuration menu - View commit details
-
Copy full SHA for a60c143 - Browse repository at this point
Copy the full SHA a60c143View commit details -
Configuration menu - View commit details
-
Copy full SHA for fbe436b - Browse repository at this point
Copy the full SHA fbe436bView commit details -
Configuration menu - View commit details
-
Copy full SHA for cb30219 - Browse repository at this point
Copy the full SHA cb30219View commit details -
Configuration menu - View commit details
-
Copy full SHA for 64982cc - Browse repository at this point
Copy the full SHA 64982ccView commit details -
Configuration menu - View commit details
-
Copy full SHA for 10fbafa - Browse repository at this point
Copy the full SHA 10fbafaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9ab505a - Browse repository at this point
Copy the full SHA 9ab505aView commit details -
Configuration menu - View commit details
-
Copy full SHA for e1c284b - Browse repository at this point
Copy the full SHA e1c284bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6626295 - Browse repository at this point
Copy the full SHA 6626295View commit details -
Auto merge of rust-lang#6684 - matthiaskrgr:versiontest_dont_break_up…
…stream, r=flip1995 tests: ignore check_that_clippy_has_the_same_major_version_as_rustc()inside the rustc repo Do not check if clippy version matches rustc version when runnning tests inside the rustc repo. This makes sure that upstream rustc maintainers do not have to deal with our test failing/mismatching versions when the rustc version bump is happening. cc rust-lang#6683 We already do the "don't run inside the rustc-repo" workaround for the dogfood test: https://github.com/rust-lang/rust-clippy/blob/a507c27660d05f37307369d30bee9e82ce3a11e1/tests/dogfood.rs#L16 changelog: None
Configuration menu - View commit details
-
Copy full SHA for dfb34c0 - Browse repository at this point
Copy the full SHA dfb34c0View commit details -
Revert "Fixed for loop problem, corrected all occurences that got lin…
…ted" This reverts commit 6626295.
Configuration menu - View commit details
-
Copy full SHA for cd67487 - Browse repository at this point
Copy the full SHA cd67487View commit details -
Configuration menu - View commit details
-
Copy full SHA for 85c2b1e - Browse repository at this point
Copy the full SHA 85c2b1eView commit details -
Rollup merge of rust-lang#81680 - camsteffen:primty, r=oli-obk
Refactor `PrimitiveTypeTable` for Clippy I removed `PrimitiveTypeTable` and added `PrimTy::ALL` and `PrimTy::from_name` in its place. This allows Clippy to use `PrimTy::from_name` for the `builtin_type_shadow` lint, and a `const` list of primitive types is deleted from Clippy code (the goal). All changes should be a little faster, if anything.
Configuration menu - View commit details
-
Copy full SHA for a5d442c - Browse repository at this point
Copy the full SHA a5d442cView commit details -
Configuration menu - View commit details
-
Copy full SHA for f1c1584 - Browse repository at this point
Copy the full SHA f1c1584View commit details -
Configuration menu - View commit details
-
Copy full SHA for 915e9b8 - Browse repository at this point
Copy the full SHA 915e9b8View commit details -
Configuration menu - View commit details
-
Copy full SHA for d4bc7d2 - Browse repository at this point
Copy the full SHA d4bc7d2View commit details -
Configuration menu - View commit details
-
Copy full SHA for f0d3fd7 - Browse repository at this point
Copy the full SHA f0d3fd7View commit details -
Hide clippy configuration option.
Co-authored-by: Philipp Krones <hello@philkrones.com>
Configuration menu - View commit details
-
Copy full SHA for 8805931 - Browse repository at this point
Copy the full SHA 8805931View commit details -
Configuration menu - View commit details
-
Copy full SHA for f2391a5 - Browse repository at this point
Copy the full SHA f2391a5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8b89087 - Browse repository at this point
Copy the full SHA 8b89087View commit details -
Configuration menu - View commit details
-
Copy full SHA for cd361a5 - Browse repository at this point
Copy the full SHA cd361a5View commit details -
Configuration menu - View commit details
-
Copy full SHA for e2e33b4 - Browse repository at this point
Copy the full SHA e2e33b4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3c8f754 - Browse repository at this point
Copy the full SHA 3c8f754View commit details -
Configuration menu - View commit details
-
Copy full SHA for ea0b832 - Browse repository at this point
Copy the full SHA ea0b832View commit details -
Configuration menu - View commit details
-
Copy full SHA for fd8b5fa - Browse repository at this point
Copy the full SHA fd8b5faView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2bffbfc - Browse repository at this point
Copy the full SHA 2bffbfcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0585c34 - Browse repository at this point
Copy the full SHA 0585c34View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6b4789d - Browse repository at this point
Copy the full SHA 6b4789dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 40ce056 - Browse repository at this point
Copy the full SHA 40ce056View commit details -
Configuration menu - View commit details
-
Copy full SHA for dfe08f4 - Browse repository at this point
Copy the full SHA dfe08f4View commit details
Commits on Feb 7, 2021
-
Auto merge of rust-lang#6682 - camsteffen:let-underscore-ref, r=llogiq
Fix let_underscore_drop FP changelog: Fix let_underscore_drop false positives and negatives Fixes rust-lang#6633
Configuration menu - View commit details
-
Copy full SHA for d792210 - Browse repository at this point
Copy the full SHA d792210View commit details -
Auto merge of rust-lang#6688 - rust-lang:triagebot_update, r=phansch
Update triagebot.toml to new label names changelog: none
Configuration menu - View commit details
-
Copy full SHA for b36d1a4 - Browse repository at this point
Copy the full SHA b36d1a4View commit details -
Auto merge of rust-lang#6660 - camsteffen:path-to-local, r=llogiq
Cleanup path-to-local checks changelog: none It seemed like too much ceremony going on to check if an expression matches a variable. So I created two util functions `path_to_local(Expr) -> Option<HirId>` and `path_to_local_id(Expr, HirId) -> bool` to make this easier, and used them wherever applicable. I changed logic in a few places to use `HirId` instead of `Symbol` where it was easy to do so. I believe this is more correct and may even fix some bugs. I also removed some calls to `qpath_res`. This is not needed if you are only looking for a `Res::Local`. As a note, I wanted to name the util functions in a way that encourages understanding of the HIR.
Configuration menu - View commit details
-
Copy full SHA for d51db24 - Browse repository at this point
Copy the full SHA d51db24View commit details -
Auto merge of rust-lang#6681 - 1c3t3a:1c3t3a-issue-6467, r=xFrednet,f…
…lip1995,phansch Adds a new lint that checks if there is a semicolon on the last block statement if it returns nothing changelog: Added a new lint: `SEMICOLON_IF_NOTHING_RETURNED` fixes rust-lang#6467 Adds the `SEMICOLON_IF_NOTHING_RETURNED` lint and therefore closes rust-lang#6467.
Configuration menu - View commit details
-
Copy full SHA for 001185d - Browse repository at this point
Copy the full SHA 001185dView commit details -
Auto merge of rust-lang#6685 - magurotuna:filter_map_identity, r=phansch
Add new lint `filter_map_identity` <!-- Thank you for making Clippy better! We're collecting our changelog from pull request descriptions. If your PR only includes internal changes, you can just write `changelog: none`. Otherwise, please write a short comment explaining your change. If your PR fixes an issue, you can add "fixes #issue_number" into this PR description. This way the issue will be automatically closed when your PR is merged. If you added a new lint, here's a checklist for things that will be checked during review or continuous integration. - \[x] Followed [lint naming conventions][lint_naming] - \[x] Added passing UI tests (including committed `.stderr` file) - \[x] `cargo test` passes locally - \[x] Executed `cargo dev update_lints` - \[x] Added lint documentation - \[x] Run `cargo dev fmt` [lint_naming]: https://rust-lang.github.io/rfcs/0344-conventions-galore.html#lints Note that you can skip the above if you are just opening a WIP PR in order to get feedback. Delete this line and everything above before opening your PR. --> This commit adds a new lint named filter_map_identity. This lint is the same as `flat_map_identity` except that it checks for the usage of `filter_map`. --- Closes rust-lang#6643 changelog: Added a new lint: `filter_map_identity`
Configuration menu - View commit details
-
Copy full SHA for ad9ceee - Browse repository at this point
Copy the full SHA ad9ceeeView commit details -
Auto merge of rust-lang#6674 - phlip9:disallowed_functions, r=llogiq
disallowed_methods: Support functions in addition to methods ## Context: Hey all! I have a particular use case where I'd like to ban certain functions in a code base I work on. For example, I want to ban `Instant::now()` (among others) as we have a time service for mocking time in deterministic simulation tests. Obviously, it doesn't make sense to include a lint like this for all clippy users. Imagine my excitement when I spotted the new `disallowed_methods` lint in clippy--perfect! Unfortunately, after playing around with it for a bit, I was frustrated to realize that it didn't support functions like `Instant::now()`, so I've added support for them in this PR. It might also make sense to rename the lint from `disallowed_methods` -> `disallowed_functions`, though I've held off from including that rename in this change, since I'm unsure of clippy's breaking change policy. ## Change Support functions in addition to methods. In other words, support: `disallowed_methods = ["alloc::vec::Vec::new"]` (a function) in addition to `disallowed_methods = ["alloc::vec::Vec::leak"]` (a method). Improve the documentation to clarify that users must specify the full qualified path for each disallowed function, which can be confusing for reexports. Include an example `clippy.toml`. Simplify the actual lint pass so we can reuse `utils::fn_def_id`. changelog: disallowed_method: Now supports functions in addition to methods
Configuration menu - View commit details
-
Copy full SHA for 83b7b16 - Browse repository at this point
Copy the full SHA 83b7b16View commit details -
Auto merge of rust-lang#6686 - matthiaskrgr:lintcheck_git, r=flip1995
lintcheck: support git sources This adds support for git sources in `cargo dev-lintcheck` You can add a git source to `clippy_dev/lintcheck_crates.toml` by having a `git_url` and a `git_hash` key instead of the `versions` array. The repo will the be cloned and checked out to the requested commit before checking it with clippy. Fixes rust-lang/rust-clippy#6642 changelog: lintcheck: support git sources
Configuration menu - View commit details
-
Copy full SHA for c1ce78f - Browse repository at this point
Copy the full SHA c1ce78fView commit details -
lintcheck: add a cmdline option --crates-toml <TOML PATH> to override…
… crate sources file to use. Fixes rust-lang#6691
Configuration menu - View commit details
-
Copy full SHA for 6f3eeac - Browse repository at this point
Copy the full SHA 6f3eeacView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1c3033d - Browse repository at this point
Copy the full SHA 1c3033dView commit details -
Auto merge of rust-lang#6694 - matthiaskrgr:lintcheck-cfg, r=Manishearth
lintcheck: add a cmdline option --crates-toml <TOML PATH> to override crate sources file to use. Fixes rust-lang#6691 changelog: lintcheck: add --crates-toml cmdline option to override default crates.toml file.
Configuration menu - View commit details
-
Copy full SHA for de35c29 - Browse repository at this point
Copy the full SHA de35c29View commit details -
`start_point` needs to return the *first* character's span, but it would previously call `find_width_of_character_at_span` which returns the span of the *last* character. The implementation is now fixed. Other changes: - Docs for start_point, end_point, find_width_of_character_at_span updated - Minor simplification in find_width_of_character_at_span code Fixes rust-lang#81800
Configuration menu - View commit details
-
Copy full SHA for 7e94641 - Browse repository at this point
Copy the full SHA 7e94641View commit details
Commits on Feb 8, 2021
-
Configuration menu - View commit details
-
Copy full SHA for fd35517 - Browse repository at this point
Copy the full SHA fd35517View commit details -
Auto merge of rust-lang#6696 - dtolnay-contrib:regex, r=Manishearth
Downgrade trivial_regex to nursery See rust-lang#6690. I think there is still value in a trivial_regex lint, but only if clippy can tell that the regex is only ever constructed and applied to a single input. ```rust let regex = Regex::new("trivial_regex")?; println!("{}", regex.is_match(s)); // `regex` never used again ``` --- changelog: remove `trivial_regex` from default set of enabled lints
Configuration menu - View commit details
-
Copy full SHA for 4bbd7e4 - Browse repository at this point
Copy the full SHA 4bbd7e4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1d30422 - Browse repository at this point
Copy the full SHA 1d30422View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5db48a3 - Browse repository at this point
Copy the full SHA 5db48a3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 37555f8 - Browse repository at this point
Copy the full SHA 37555f8View commit details
Commits on Feb 9, 2021
-
This renames the variants in HIR UnOp from enum UnOp { UnDeref, UnNot, UnNeg, } to enum UnOp { Deref, Not, Neg, } Motivations: - This is more consistent with the rest of the code base where most enum variants don't have a prefix. - These variants are never used without the `UnOp` prefix so the extra `Un` prefix doesn't help with readability. E.g. we don't have any `UnDeref`s in the code, we only have `UnOp::UnDeref`. - MIR `UnOp` type variants don't have a prefix so this is more consistent with MIR types. - "un" prefix reads like "inverse" or "reverse", so as a beginner in rustc code base when I see "UnDeref" what comes to my mind is something like "&*" instead of just "*".
Configuration menu - View commit details
-
Copy full SHA for 34b373d - Browse repository at this point
Copy the full SHA 34b373dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 775ce47 - Browse repository at this point
Copy the full SHA 775ce47View commit details -
Auto merge of rust-lang#6704 - rust-lang:flip1995-patch-1, r=phansch
Rename "good first issue" back to "good-first-issue" changelog: none
Configuration menu - View commit details
-
Copy full SHA for 03a0dd5 - Browse repository at this point
Copy the full SHA 03a0dd5View commit details -
Configuration menu - View commit details
-
Copy full SHA for b932587 - Browse repository at this point
Copy the full SHA b932587View commit details -
Remove rustfmt from rust-toolchain file
We use latest nightly rustfmt in our tests anyway
Configuration menu - View commit details
-
Copy full SHA for 03737e2 - Browse repository at this point
Copy the full SHA 03737e2View commit details -
Auto merge of rust-lang#6709 - rust-lang:flip1995-patch-1, r=matthias…
…krgr Remove rustfmt from rust-toolchain file We use latest nightly rustfmt in our tests anyway r? `@matthiaskrgr` changelog: none
Configuration menu - View commit details
-
Copy full SHA for 08b4d50 - Browse repository at this point
Copy the full SHA 08b4d50View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1eb79f3 - Browse repository at this point
Copy the full SHA 1eb79f3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 638980a - Browse repository at this point
Copy the full SHA 638980aView commit details -
Remove unnecessary note on errors
Seeing the trait definition doesn't help with implementation not general enough errors, so don't make the error message larger to show it.
Configuration menu - View commit details
-
Copy full SHA for c2066cf - Browse repository at this point
Copy the full SHA c2066cfView commit details -
Configuration menu - View commit details
-
Copy full SHA for daab6db - Browse repository at this point
Copy the full SHA daab6dbView commit details -
Report "nice" placeholder errors more often
If we have a cause containing `ValuePairs::PolyTraitRefs` but neither TraitRef has any escaping bound regions then we report the same error as for `ValuePairs::TraitRefs`.
Configuration menu - View commit details
-
Copy full SHA for 94c11df - Browse repository at this point
Copy the full SHA 94c11dfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9337d4f - Browse repository at this point
Copy the full SHA 9337d4fView commit details
Commits on Feb 10, 2021
-
Auto merge of rust-lang#6698 - camsteffen:path-to-local, r=phansch
More path-to-local fixes changelog: Fix some detections of variable usage in closures
Configuration menu - View commit details
-
Copy full SHA for 0e371b8 - Browse repository at this point
Copy the full SHA 0e371b8View commit details -
Update clippy_lints/src/methods/bytes_nth.rs
Co-authored-by: Phil Hansch <dev@phansch.net>
Configuration menu - View commit details
-
Copy full SHA for 932cc08 - Browse repository at this point
Copy the full SHA 932cc08View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5996ae1 - Browse repository at this point
Copy the full SHA 5996ae1View commit details -
Auto merge of rust-lang#6687 - ehuss:stabilize-wrapper, r=flip1995
Stabilize workspace wrapper. This fixes it so that `cargo clippy` doesn't share the same cache artifacts as `cargo check`. The Cargo side was stabilized a while ago (rust-lang/cargo#8976), so this should be ready to go. I'm not aware of any blockers or concerns. Closes rust-lang#4612 --- changelog: `cargo clippy` no longer shares the same build cache as `cargo check`.
Configuration menu - View commit details
-
Copy full SHA for 9c0ae2a - Browse repository at this point
Copy the full SHA 9c0ae2aView commit details -
Auto merge of rust-lang#6695 - TaKO8Ki:add-bytes-nth, r=phansch
New lint: `bytes_nth` This pull request adds a new lint named `bytes_nth`. --- closes: rust-lang/rust-clippy#6391 changelog: Added a new lint: `bytes_nth`
Configuration menu - View commit details
-
Copy full SHA for b5e4389 - Browse repository at this point
Copy the full SHA b5e4389View commit details -
Configuration menu - View commit details
-
Copy full SHA for 94b8f23 - Browse repository at this point
Copy the full SHA 94b8f23View commit details -
Auto merge of rust-lang#6714 - alpaca-tc:fixed_tiny_typo, r=flip1995
Fix typo changelog: none
Configuration menu - View commit details
-
Copy full SHA for a6d6b1b - Browse repository at this point
Copy the full SHA a6d6b1bView commit details -
Auto merge of rust-lang#6657 - ThibsG:FromIterParens, r=llogiq
Fix suggestions that need parens in `from_iter_instead_of_collect` lint Fixes broken suggestions that need parens (i.e.: range) Fixes: rust-lang#6648 changelog: none
Configuration menu - View commit details
-
Copy full SHA for 3784cdf - Browse repository at this point
Copy the full SHA 3784cdfView commit details -
Configuration menu - View commit details
-
Copy full SHA for f852160 - Browse repository at this point
Copy the full SHA f852160View commit details
Commits on Feb 11, 2021
-
Auto merge of rust-lang#6650 - daxpedda:cargo-common-metadata-publish…
…, r=flip1995 Fix cargo_common_metadata warning on `publish = false`. I believe `cargo_common_metadata` shouldn't trigger when `publish = false`, not sure if everybody agrees. Made some tests to handle all edge-cases. Fixes rust-lang#6649. changelog: [`cargo_common_metadata`](https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata): No longer lints if [`publish = false`](https://doc.rust-lang.org/cargo/reference/manifest.html#the-publish-field) is defined in the manifest
Configuration menu - View commit details
-
Copy full SHA for beb49ba - Browse repository at this point
Copy the full SHA beb49baView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1025cd3 - Browse repository at this point
Copy the full SHA 1025cd3View commit details -
lintcheck: make the log file be ${source-file}-logs.txt
this allows us to check multiple source.tomls and not worry about overriding our logfiles accidentally
Configuration menu - View commit details
-
Copy full SHA for c7241b6 - Browse repository at this point
Copy the full SHA c7241b6View commit details -
Configuration menu - View commit details
-
Copy full SHA for cfe154b - Browse repository at this point
Copy the full SHA cfe154bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5e29aa6 - Browse repository at this point
Copy the full SHA 5e29aa6View commit details -
Configuration menu - View commit details
-
Copy full SHA for a6d493d - Browse repository at this point
Copy the full SHA a6d493dView commit details -
Auto merge of rust-lang#6708 - matthiaskrgr:lintcheck, r=flip1995
some more lintcheck changes * Explain why tokei is commented out in the lintcheck sources. * If we specify a custom sources.toml, don't override the preexisting lintcheck logs, but rather start a new log with the filename depending on the sources.toml name. * Start adding a readme.md to clippy_dev and add some information on how to use the lintcheck subcommand. * Add support for path/local sources (I needed this for the next item which is: ) * Collect ICEs that happen while clippy checks crates changelog: more lintcheck changes
Configuration menu - View commit details
-
Copy full SHA for 8dbcffe - Browse repository at this point
Copy the full SHA 8dbcffeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 00f9981 - Browse repository at this point
Copy the full SHA 00f9981View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4efc454 - Browse repository at this point
Copy the full SHA 4efc454View commit details -
Auto merge of rust-lang#6718 - flip1995:rustup, r=flip1995
Rustup r? `@ghost` changelog: none
Configuration menu - View commit details
-
Copy full SHA for 70c0f90 - Browse repository at this point
Copy the full SHA 70c0f90View commit details -
Configuration menu - View commit details
-
Copy full SHA for d2e2f64 - Browse repository at this point
Copy the full SHA d2e2f64View commit details
Commits on Feb 13, 2021
-
Configuration menu - View commit details
-
Copy full SHA for dfa581f - Browse repository at this point
Copy the full SHA dfa581fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9bbd3e0 - Browse repository at this point
Copy the full SHA 9bbd3e0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0bf1d73 - Browse repository at this point
Copy the full SHA 0bf1d73View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9526c0c - Browse repository at this point
Copy the full SHA 9526c0cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 79f6f11 - Browse repository at this point
Copy the full SHA 79f6f11View commit details -
Make ProjectionTy::trait_ref truncate substs again
Also make sure that type arguments of associated types are printed in some error messages.
Configuration menu - View commit details
-
Copy full SHA for dfee89f - Browse repository at this point
Copy the full SHA dfee89fView commit details -
Configuration menu - View commit details
-
Copy full SHA for d785c8c - Browse repository at this point
Copy the full SHA d785c8cView commit details -
Configuration menu - View commit details
-
Copy full SHA for eeb82e4 - Browse repository at this point
Copy the full SHA eeb82e4View commit details -
Configuration menu - View commit details
-
Copy full SHA for be1ed00 - Browse repository at this point
Copy the full SHA be1ed00View commit details
Commits on Feb 14, 2021
-
Configuration menu - View commit details
-
Copy full SHA for a9b16c6 - Browse repository at this point
Copy the full SHA a9b16c6View commit details
Commits on Feb 15, 2021
-
Configuration menu - View commit details
-
Copy full SHA for a491f51 - Browse repository at this point
Copy the full SHA a491f51View commit details -
Configuration menu - View commit details
-
Copy full SHA for f856224 - Browse repository at this point
Copy the full SHA f856224View commit details -
Configuration menu - View commit details
-
Copy full SHA for a4b2faf - Browse repository at this point
Copy the full SHA a4b2fafView commit details -
Simplify pattern grammar by allowing nested leading vert
Along the way, we also implement a handful of diagnostics improvements and fixes, particularly with respect to the special handling of `||` in place of `|` and when there are leading verts in function params, which don't allow top-level or-patterns anyway.
Configuration menu - View commit details
-
Copy full SHA for aee1e59 - Browse repository at this point
Copy the full SHA aee1e59View commit details
Commits on Feb 16, 2021
-
Configuration menu - View commit details
-
Copy full SHA for b86c5db - Browse repository at this point
Copy the full SHA b86c5dbView commit details -
Configuration menu - View commit details
-
Copy full SHA for e39c3c0 - Browse repository at this point
Copy the full SHA e39c3c0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1b86ad8 - Browse repository at this point
Copy the full SHA 1b86ad8View commit details -
Configuration menu - View commit details
-
Copy full SHA for f99e152 - Browse repository at this point
Copy the full SHA f99e152View commit details -
Configuration menu - View commit details
-
Copy full SHA for b97951b - Browse repository at this point
Copy the full SHA b97951bView commit details -
Configuration menu - View commit details
-
Copy full SHA for f520295 - Browse repository at this point
Copy the full SHA f520295View commit details -
Configuration menu - View commit details
-
Copy full SHA for a98b22c - Browse repository at this point
Copy the full SHA a98b22cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 61bb183 - Browse repository at this point
Copy the full SHA 61bb183View commit details
Commits on Feb 17, 2021
-
Rollup merge of rust-lang#79981 - camelid:overflowing_literals-infere…
…nce-error, r=lcnr Add 'consider using' message to overflowing_literals Fixes rust-lang#79744. Ironically, the `overflowing_literals` handler for binary or hex already had this message! You would think it would be the other way around :) cc ``@scottmcm``
Configuration menu - View commit details
-
Copy full SHA for e19d6fc - Browse repository at this point
Copy the full SHA e19d6fcView commit details -
Rollup merge of rust-lang#81860 - osa1:issue81800, r=estebank
Fix SourceMap::start_point `start_point` needs to return the *first* character's span, but it would previously call `find_width_of_character_at_span` which returns the span of the *last* character. The implementation is now fixed. Other changes: - Docs for start_point, end_point, find_width_of_character_at_span updated - Minor simplification in find_width_of_character_at_span code Fixes rust-lang#81800
Configuration menu - View commit details
-
Copy full SHA for 06bb4e7 - Browse repository at this point
Copy the full SHA 06bb4e7View commit details -
Rollup merge of rust-lang#81869 - mark-i-m:leading-vert, r=petrochenkov
Simplify pattern grammar, improve or-pattern diagnostics This implements the change under FCP in rust-lang#81415. It allows nested or-patterns to contain a leading `|`, simplifying the [grammar for patterns](https://github.com/rust-lang/reference/pull/957/files?short_path=cc629f1#diff-cc629f15712821139bc706c63b3845ab59a008e2a998e08ffad42e3aebcbcbe2). Along the way, we also improve the diagnostics around a few specially-handled cases, such as using `||` instead of `|`, using or-patterns in fn params, including the leading `|` in the pattern span, etc. r? ```@petrochenkov```
Configuration menu - View commit details
-
Copy full SHA for 6ea042c - Browse repository at this point
Copy the full SHA 6ea042cView commit details -
Rollup merge of rust-lang#81972 - matthewjasper:hrtb-error-cleanup, r…
…=nikomatsakis Placeholder lifetime error cleanup - Remove note of trait definition - Avoid repeating the same self type - Use original region names when possible - Use this error kind more often - Print closure signatures when they are suppose to implement `Fn*` traits Works towards rust-lang#57374 r? ``@nikomatsakis``
Configuration menu - View commit details
-
Copy full SHA for 6e082bd - Browse repository at this point
Copy the full SHA 6e082bdView commit details -
Rollup merge of rust-lang#81993 - flip1995:clippyup, r=Manishearth
Update Clippy Biweekly Clippy update r? ````@Manishearth````
Configuration menu - View commit details
-
Copy full SHA for 7b293bb - Browse repository at this point
Copy the full SHA 7b293bbView commit details -
Rollup merge of rust-lang#82007 - sexxi-goose:reborrow, r=nikomatsakis
Implement reborrow for closure captures The strategy for captures is detailed here with examples: https://hackmd.io/PzxYMPY4RF-B9iH9uj9GTA Key points: - We only need to reborrow a capture in case of move closures. - If we mutate something via a `&mut` we store it as a `MutBorrow`/`UniqueMuBorrow` of the path containing the `&mut`, - Similarly, if it's read via `&` ref we just store it as a `ImmBorrow` of the path containing the `&` ref. - If a path doesn't deref a `&mut`, `&`, then that path is captured by Move. - If the use of a path results in a move when the closure is called, then that path is truncated before any deref and the truncated path is moved into the closure. - In the case of non-move closure if a use of a path results in a move, then the path is truncated before any deref and the truncated path is moved into the closure. Note that the implementation differs a bit from the document to allow for truncated path to be used in the ClosureKind analysis that happens as part of the first capture analysis pass. Closes: rust-lang/project-rfc-2229#31 r? ```@nikomatsakis```
Configuration menu - View commit details
-
Copy full SHA for f5417bd - Browse repository at this point
Copy the full SHA f5417bdView commit details -
Rollup merge of rust-lang#82055 - JulianKnodt:ty_where_const, r=estebank
Add diagnostics for specific cases for const/type mismatch err For now, this adds at least more information so better diagnostics can be emitted for const mismatch errors. I'm not sure what exactly we want to emit, so I've left notes there temporarily, also to see if this is the right approach r? ``@lcnr`` cc: ``@estebank``
Configuration menu - View commit details
-
Copy full SHA for 8e87fe9 - Browse repository at this point
Copy the full SHA 8e87fe9View commit details -
Rollup merge of rust-lang#82066 - matthewjasper:trait-ref-fix, r=jack…
…h726 Ensure valid TraitRefs are created for GATs This fixes `ProjectionTy::trait_ref` to use the correct substs. Places that need all of the substs have been updated to not use `trait_ref`. r? ``@jackh726``
Configuration menu - View commit details
-
Copy full SHA for a96e072 - Browse repository at this point
Copy the full SHA a96e072View commit details -
Rollup merge of rust-lang#82136 - edward-shen:mismatched-subst-and-hi…
…r, r=lcnr Fix ICE: Use delay_span_bug for mismatched subst/hir arg Fixes rust-lang#82126.
Configuration menu - View commit details
-
Copy full SHA for 25835bc - Browse repository at this point
Copy the full SHA 25835bcView commit details -
Rollup merge of rust-lang#82196 - Manishearth:display-caveat, r=m-ou-se
Add caveat to Path::display() about lossiness It's worth calling out that this API may do a lossy display. r? ``@m-ou-se``
Configuration menu - View commit details
-
Copy full SHA for 116f2e5 - Browse repository at this point
Copy the full SHA 116f2e5View commit details -
Rollup merge of rust-lang#82198 - SkiFire13:optimize-iter-is-sorted, …
…r=sfackler Use internal iteration in Iterator::is_sorted_by
Configuration menu - View commit details
-
Copy full SHA for 7bd07a5 - Browse repository at this point
Copy the full SHA 7bd07a5View commit details