]> git.lizzy.rs Git - rust.git/log
rust.git
3 years agoMove `test_no_deps_ignores_path_deps_in_workspaces()` out of `dogfood_subprojects()`
hyd-dev [Mon, 8 Mar 2021 10:29:36 +0000 (18:29 +0800)]
Move `test_no_deps_ignores_path_deps_in_workspaces()` out of `dogfood_subprojects()`

3 years agoRename `ClippyArgsCallbacks` to `RustcCallbacks`
hyd-dev [Mon, 8 Mar 2021 10:28:43 +0000 (18:28 +0800)]
Rename `ClippyArgsCallbacks` to `RustcCallbacks`

3 years agoLet Cargo track `CLIPPY_ARGS`
hyd-dev [Wed, 3 Mar 2021 14:06:36 +0000 (22:06 +0800)]
Let Cargo track `CLIPPY_ARGS`

3 years agoAuto merge of #6824 - Y-Nak:refactor_loops_module, r=flip1995
bors [Wed, 3 Mar 2021 10:34:22 +0000 (10:34 +0000)]
Auto merge of #6824 - Y-Nak:refactor_loops_module, r=flip1995

Refactor: organize loops file into loops module (Delegated)

`@flip1995` `@nahuakang`

closes #6693
r? `@flip1995`

 As we talked about in the PM of Zulip,  this PR is a delegated PR from `@nahuakang.`

Changes from the last commit of #6693:
1. Unify the name of the main entries of all modules to check, that was pointed out [here](https://github.com/rust-lang/rust-clippy/pull/6693#discussion_r582897713)
2. Simplify ` check_for_loop_arg`, that was pointed out [here](https://github.com/rust-lang/rust-clippy/pull/6693#discussion_r582914044) and [here](https://github.com/rust-lang/rust-clippy/pull/6693#discussion_r582929910)
3. Resolve conflicts

changelog: Refactor `loops.rs` file into `loops` module.

3 years agoAuto merge of #6801 - Jarcho:manual_match_fix, r=phansch
bors [Tue, 2 Mar 2021 15:36:00 +0000 (15:36 +0000)]
Auto merge of #6801 - Jarcho:manual_match_fix, r=phansch

Fix `manual_map` false positives

fixes: #6795
fixes: #6797
fixes: #6811
fixes: #6819

changelog: Fix false positives for `manual_map` when `return`, `break`, `continue`, `yield`, `await`, and partially moved values are used.
changelog: Don't expand macros in suggestions  for `manual_map`

3 years agoRemove "for_loop_arg.rs"
Yoshitomo Nakanishi [Tue, 2 Mar 2021 12:09:04 +0000 (21:09 +0900)]
Remove "for_loop_arg.rs"

3 years agoAuto merge of #6791 - TaKO8Ki:iter-count, r=matthiaskrgr
bors [Tue, 2 Mar 2021 11:31:43 +0000 (11:31 +0000)]
Auto merge of #6791 - TaKO8Ki:iter-count, r=matthiaskrgr

New lint: `iter_count`

This pull request adds a new lint named `iter_count`.

---

closes https://github.com/rust-lang/rust-clippy/issues/6262

changelog: new lint `iter_count`

3 years agoAuto merge of #6716 - magurotuna:refactor-transmute-mod, r=flip1995
bors [Tue, 2 Mar 2021 09:44:03 +0000 (09:44 +0000)]
Auto merge of #6716 - magurotuna:refactor-transmute-mod, r=flip1995

Refactor: arrange transmute lints

This PR arranges `transmute` lints so that they can be accessed more easily.
Basically, I followed the instruction described in #6680 as to how to do the refactoring.

- `declare_clippy_lint!` and `impl LintPass` is placed in `transmute/mod.rs`
- Uitlity functions is placed in `transmute/utils.rs`
- Each lint function about `transmute` is moved into its own module, like `transmute/useless_transmute.rs`

For ease of review, I refactored step by step, keeping each commit small. For instance, all I did in
2451781 was to move  `useless_transmute` into its own module.

---

changelog: Refactor `transmute.rs` file into `transmute` module.

3 years agoMake check_cast private
Yusuke Tanaka [Wed, 10 Feb 2021 16:42:12 +0000 (01:42 +0900)]
Make check_cast private

3 years agoRefactor calls to lint check functions
Yusuke Tanaka [Wed, 10 Feb 2021 16:41:52 +0000 (01:41 +0900)]
Refactor calls to lint check functions

3 years agoCleanup imports
Yusuke Tanaka [Wed, 10 Feb 2021 16:29:45 +0000 (01:29 +0900)]
Cleanup imports

3 years agoMove transmutes_expressible_as_ptr_casts to its own module
Yusuke Tanaka [Wed, 10 Feb 2021 16:27:44 +0000 (01:27 +0900)]
Move transmutes_expressible_as_ptr_casts to its own module

3 years agoMove unsound_collection_transmute to its own module
Yusuke Tanaka [Wed, 10 Feb 2021 16:21:38 +0000 (01:21 +0900)]
Move unsound_collection_transmute to its own module

3 years agoMove transmute_float_to_int to its own module
Yusuke Tanaka [Wed, 10 Feb 2021 16:08:48 +0000 (01:08 +0900)]
Move transmute_float_to_int to its own module

3 years agoMove transmute_int_to_float to its own module
Yusuke Tanaka [Wed, 10 Feb 2021 16:03:08 +0000 (01:03 +0900)]
Move transmute_int_to_float to its own module

3 years agoMove transmute_int_to_bool to its own module
Yusuke Tanaka [Wed, 10 Feb 2021 15:55:32 +0000 (00:55 +0900)]
Move transmute_int_to_bool to its own module

3 years agoMove transmute_ptr_to_ptr to its own module
Yusuke Tanaka [Wed, 10 Feb 2021 15:50:09 +0000 (00:50 +0900)]
Move transmute_ptr_to_ptr to its own module

3 years agoMove transmute_bytes_to_str and transmute_ptr_to_ptr to transmute_ref_to_ref module
Yusuke Tanaka [Wed, 10 Feb 2021 15:40:57 +0000 (00:40 +0900)]
Move transmute_bytes_to_str and transmute_ptr_to_ptr to transmute_ref_to_ref module

3 years agoMove transmute_int_to_char to its own module
Yusuke Tanaka [Wed, 10 Feb 2021 15:18:45 +0000 (00:18 +0900)]
Move transmute_int_to_char to its own module

3 years agoMove transmute_ptr_to_ref to its own module
Yusuke Tanaka [Wed, 10 Feb 2021 15:10:19 +0000 (00:10 +0900)]
Move transmute_ptr_to_ref to its own module

3 years agoMove crosspointer_transmute to its own module
Yusuke Tanaka [Wed, 10 Feb 2021 15:02:21 +0000 (00:02 +0900)]
Move crosspointer_transmute to its own module

3 years agoMove wrong_transmute to its own module
Yusuke Tanaka [Wed, 10 Feb 2021 14:57:56 +0000 (23:57 +0900)]
Move wrong_transmute to its own module

3 years agoMove useless_transmute to its own module
Yusuke Tanaka [Wed, 10 Feb 2021 14:54:11 +0000 (23:54 +0900)]
Move useless_transmute to its own module

3 years agoAdd transmute/utils.rs
Yusuke Tanaka [Wed, 10 Feb 2021 14:15:06 +0000 (23:15 +0900)]
Add transmute/utils.rs

3 years agoCreate transmute directory
Yusuke Tanaka [Wed, 10 Feb 2021 13:59:08 +0000 (22:59 +0900)]
Create transmute directory

3 years agoSimplify check_for_loop_arg
Yoshitomo Nakanishi [Tue, 2 Mar 2021 03:41:06 +0000 (12:41 +0900)]
Simplify check_for_loop_arg

3 years agoUnify names of lint entry functions in loops to 'check'
Yoshitomo Nakanishi [Tue, 2 Mar 2021 02:49:14 +0000 (11:49 +0900)]
Unify names of lint entry functions in loops to 'check'

3 years agoInclude loops.rs changes from PR#6698
nahuakang [Mon, 22 Feb 2021 15:24:25 +0000 (16:24 +0100)]
Include loops.rs changes from PR#6698

3 years agoClean up: Rename some files to be consistent with lint names; import lints to each...
nahuakang [Sun, 21 Feb 2021 17:25:50 +0000 (18:25 +0100)]
Clean up: Rename some files to be consistent with lint names; import lints to each file

3 years agoMove check_for_loop_arg back to mod; split into 4 lint files
nahuakang [Sun, 21 Feb 2021 17:12:17 +0000 (18:12 +0100)]
Move check_for_loop_arg back to mod; split into 4 lint files

3 years agoMove MinifyingSugg into manual_memcpy
nahuakang [Sun, 21 Feb 2021 16:10:07 +0000 (17:10 +0100)]
Move MinifyingSugg into manual_memcpy

3 years agoRefactor while let loop to its own module
nahuakang [Sun, 21 Feb 2021 16:01:49 +0000 (17:01 +0100)]
Refactor while let loop to its own module

3 years agoRefactor empty loop to its own module
nahuakang [Sun, 21 Feb 2021 15:48:16 +0000 (16:48 +0100)]
Refactor empty loop to its own module

3 years agoRefactor while let on iterator lint to its module; rename for loop explicit counter...
nahuakang [Sun, 21 Feb 2021 15:37:09 +0000 (16:37 +0100)]
Refactor while let on iterator lint to its module; rename for loop explicit counter to explicit counter loop

3 years agoRefactor never loop to its own module
nahuakang [Sun, 21 Feb 2021 14:58:05 +0000 (15:58 +0100)]
Refactor never loop to its own module

3 years agoMove detect_manual_memcpy to its module; split up utils structs
nahuakang [Tue, 9 Feb 2021 22:27:03 +0000 (23:27 +0100)]
Move detect_manual_memcpy to its module; split up utils structs

3 years agoAdd detect_same_item_push to its own module
nahuakang [Tue, 9 Feb 2021 20:58:10 +0000 (21:58 +0100)]
Add detect_same_item_push to its own module

3 years agoAdd check_needless_collect to its own module
nahuakang [Tue, 9 Feb 2021 20:26:46 +0000 (21:26 +0100)]
Add check_needless_collect to its own module

3 years agoAdd check_infinite_loop to its own module
nahuakang [Tue, 9 Feb 2021 19:21:22 +0000 (20:21 +0100)]
Add check_infinite_loop to its own module

3 years agoRefactor check_for_single_element_loop to its own module
nahuakang [Mon, 8 Feb 2021 21:12:32 +0000 (22:12 +0100)]
Refactor check_for_single_element_loop to its own module

3 years agoRefactor check_for_loop_explicit_counter to its own module
nahuakang [Mon, 8 Feb 2021 21:01:05 +0000 (22:01 +0100)]
Refactor check_for_loop_explicit_counter to its own module

3 years agoRefactor check_for_loop_range into its module
nahuakang [Mon, 8 Feb 2021 20:38:00 +0000 (21:38 +0100)]
Refactor check_for_loop_range into its module

3 years agoRefactor check_for_mut_range_bound to its own module
nahuakang [Mon, 8 Feb 2021 20:20:23 +0000 (21:20 +0100)]
Refactor check_for_mut_range_bound to its own module

3 years agoRefactor check_for_loop_over_map_kv to its own module
nahuakang [Mon, 8 Feb 2021 20:04:33 +0000 (21:04 +0100)]
Refactor check_for_loop_over_map_kv to its own module

3 years agoRefactor check_for_loop_arg; rename manual_flatten's lint back to check_manual_flatten
nahuakang [Mon, 8 Feb 2021 19:47:35 +0000 (20:47 +0100)]
Refactor check_for_loop_arg; rename manual_flatten's lint back to check_manual_flatten

3 years agocreate loops dir; arrange manual_flatten lint and utils
nahuakang [Sun, 7 Feb 2021 12:35:27 +0000 (13:35 +0100)]
create loops dir; arrange manual_flatten lint and utils

3 years agoAuto merge of #6822 - camsteffen:rustfmt, r=llogiq
bors [Tue, 2 Mar 2021 08:57:11 +0000 (08:57 +0000)]
Auto merge of #6822 - camsteffen:rustfmt, r=llogiq

Rustfmt version "Two"

changelog: none

This enables some ~bug fixes~ changes from rustfmt. This is more consistent with rustc's config, and should be more forward-compatible. Also, the changes look good IMO. 😃

3 years agoDon't move `yield` or inline assembly into closure
Jason Newcomb [Mon, 1 Mar 2021 22:25:23 +0000 (17:25 -0500)]
Don't move `yield` or inline assembly into closure

3 years agoAdd version = "Two" to rustfmt.toml
Cameron Steffen [Mon, 1 Mar 2021 17:53:33 +0000 (11:53 -0600)]
Add version = "Two" to rustfmt.toml

Ignore UI tests since this change makes rustfmt less friendly with UI
test comments.

3 years agoAuto merge of #6813 - matthiaskrgr:lintcheck_refactor, r=flip1995
bors [Mon, 1 Mar 2021 11:37:08 +0000 (11:37 +0000)]
Auto merge of #6813 - matthiaskrgr:lintcheck_refactor, r=flip1995

lintcheck, do some refactoring and add more sources

refactor: add a Config object
don't run in parallel mode by default (it didn't make sense because cargo would lock the shared target dir anyway)
show full paths (from repo root) to the source files in clippy warnings so we can just copy the path from the logfile
fix more bugs
add more crates by dtolnay and embark to the sources toml

changelog: lintcheck: refactor some code and add more sources

3 years agoupdate lintcheck_crates logs and fix typos
Matthias Krüger [Sun, 28 Feb 2021 12:59:47 +0000 (13:59 +0100)]
update lintcheck_crates logs and fix typos

3 years agolintcheck: add more embark crate sources to the sources toml
Matthias Krüger [Sun, 28 Feb 2021 12:52:26 +0000 (13:52 +0100)]
lintcheck: add more embark crate sources to the sources toml

3 years agolintcheck: make download path and source path consts, move source directory from...
Matthias Krüger [Sun, 28 Feb 2021 11:36:56 +0000 (12:36 +0100)]
lintcheck: make download path and source path consts, move source directory from traget/lintcheck/crates to target/lintcheck/sources

also update logfile with the dtolnay crates

3 years agolintcheck: more fixes
Matthias Krüger [Sun, 28 Feb 2021 01:07:01 +0000 (02:07 +0100)]
lintcheck: more fixes

fix a couple of issues when checking if lintcheck needed rerun after clippy binary changed.
I was apparently still comparing the times wrongly, but it should be fixed™ now...
I actually looked at the date of the sources.toml and not at the date of the log file!

Also fix progress report counter not advancing in squential mode

3 years agolintcheck: add a couple of dtolnays crates to the source list
Matthias Krüger [Sat, 27 Feb 2021 22:31:32 +0000 (23:31 +0100)]
lintcheck: add a couple of dtolnays crates to the source list

3 years agolintcheck: put the full paths (target/lintcheck/sources/<crate>...) to the source...
Matthias Krüger [Sat, 27 Feb 2021 11:29:13 +0000 (12:29 +0100)]
lintcheck: put the full paths (target/lintcheck/sources/<crate>...) to the source files of a warning into the lintcheck log

This is more convenient when reviewing new lint warnings that popped up in the logs

3 years agolintcheck: uses consts for clippy driver and cargo clippy paths
Matthias Krüger [Sat, 27 Feb 2021 11:05:27 +0000 (12:05 +0100)]
lintcheck: uses consts for clippy driver and cargo clippy paths

3 years agolintcheck: don't run clippy in parallel by default
Matthias Krüger [Sat, 27 Feb 2021 00:34:45 +0000 (01:34 +0100)]
lintcheck: don't run clippy in parallel by default

3 years agolintcheck: refactor: introduce a basic LintcheckConfig struct which holds the job...
Matthias Krüger [Fri, 26 Feb 2021 23:29:42 +0000 (00:29 +0100)]
lintcheck: refactor: introduce a basic LintcheckConfig struct which holds the job limit and paths to the sources and log files

3 years agoAuto merge of #6787 - matthiaskrgr:lint_msgs, r=llogiq
bors [Sun, 28 Feb 2021 20:57:48 +0000 (20:57 +0000)]
Auto merge of #6787 - matthiaskrgr:lint_msgs, r=llogiq

tests: add test that roughly ensures that our lint messages conform with the diagnostics convention of the rustc dev guide

lint message should not start with uppercase letters
lint messages should not have punctuation at the end of the last line

https://rustc-dev-guide.rust-lang.org/diagnostics.html#diagnostic-structure

The test reads through all the .stderr files in the testsuit and checks lint messages that start with "help: ", "error: " etc.
There is also an exception list for special messages that are deemed acceptable.

changelog: make sure lint messages conform with the rustc dev guide and add test

3 years agoFix `manual_map`: do not expand macros in suggestions
Jason Newcomb [Sun, 28 Feb 2021 14:03:21 +0000 (09:03 -0500)]
Fix `manual_map`: do not expand macros in suggestions

3 years agouse different example (C-like) for valid capitalized start of lint message
Matthias Krüger [Sun, 28 Feb 2021 13:01:03 +0000 (14:01 +0100)]
use different example (C-like) for valid capitalized start of lint message

3 years agolintcheck: update logs
Matthias Krüger [Fri, 26 Feb 2021 21:02:00 +0000 (22:02 +0100)]
lintcheck: update logs

3 years agochange some lint messages and remove old entries from the ignorelist
Matthias Krüger [Fri, 26 Feb 2021 14:49:18 +0000 (15:49 +0100)]
change some lint messages and remove old entries from the ignorelist

3 years agodisable lint_message_convention test inside the rustc test suite
Matthias Krüger [Thu, 25 Feb 2021 11:30:51 +0000 (12:30 +0100)]
disable lint_message_convention test inside the rustc test suite

3 years agoupdate the lint messages and tests
Matthias Krüger [Wed, 24 Feb 2021 13:02:51 +0000 (14:02 +0100)]
update the lint messages and tests

3 years agofix clippy lint warnings
Matthias Krüger [Wed, 24 Feb 2021 12:56:04 +0000 (13:56 +0100)]
fix clippy lint warnings

3 years agotests: add test that roughly ensures that our lint messages conform with the diagnost...
Matthias Krüger [Wed, 24 Feb 2021 12:50:11 +0000 (13:50 +0100)]
tests: add test that roughly ensures that our lint messages conform with the diagnostics convention of the rustc dev guide

lint message should not start with uppercase letters
lint messages should not have punctuation at the end of the last line

https://rustc-dev-guide.rust-lang.org/diagnostics.html#diagnostic-structure

The test reads through all the .stderr files in the testsuit and checks lint messages that start with "help: ", "error: " etc.
There is also an exception list for special messages that are deemed acceptable.

changelog: make sure lint messages conform with the rustc dev guide and add test

3 years agoAuto merge of #6802 - camsteffen:dogfood-fix, r=llogiq
bors [Sun, 28 Feb 2021 00:49:02 +0000 (00:49 +0000)]
Auto merge of #6802 - camsteffen:dogfood-fix, r=llogiq

Remove workspace and fix dogfood (again)

changelog: none

In response to https://github.com/rust-lang/rust-clippy/pull/6733#issuecomment-785792060

3 years agoAuto merge of #6812 - Y-Nak:fix-6792, r=matthiaskrgr
bors [Sat, 27 Feb 2021 14:44:02 +0000 (14:44 +0000)]
Auto merge of #6812 - Y-Nak:fix-6792, r=matthiaskrgr

Fix ICEs 6792 and 6793

fixes #6792, fixes #6793.
r? `@matthiaskrgr`

Fixes the ICEs by replacing `TyCtxt::type_of` with `TypeckResults::expr_ty`.

changelog: none

3 years agoAdd test for ICE 6793
Yoshitomo Nakanishi [Sat, 27 Feb 2021 13:46:10 +0000 (22:46 +0900)]
Add test for ICE 6793

3 years agoUse TypeckResults::expr_ty instead of TyCtxt::type_of to fix "Not a type" ICE
Yoshitomo Nakanishi [Sat, 27 Feb 2021 12:52:15 +0000 (21:52 +0900)]
Use TypeckResults::expr_ty instead of TyCtxt::type_of to fix "Not a type" ICE

3 years agoremove pub(crate)
Takayuki Maeda [Fri, 26 Feb 2021 08:38:21 +0000 (17:38 +0900)]
remove pub(crate)

3 years agoexport `derefs_to_slice` from methods module
Takayuki Maeda [Fri, 26 Feb 2021 08:07:00 +0000 (17:07 +0900)]
export `derefs_to_slice` from methods module

3 years agoreceive iter method name as an argument
Takayuki Maeda [Fri, 26 Feb 2021 07:21:43 +0000 (16:21 +0900)]
receive iter method name as an argument

3 years agoremove if_chain
Takayuki Maeda [Fri, 26 Feb 2021 06:49:03 +0000 (15:49 +0900)]
remove if_chain

3 years agoreturn when the ty doesn't have `len()`
Takayuki Maeda [Thu, 25 Feb 2021 19:11:01 +0000 (04:11 +0900)]
return when the ty doesn't have `len()`

3 years agomove `lints()` to `iter_count.rs`
Takayuki Maeda [Thu, 25 Feb 2021 17:18:52 +0000 (02:18 +0900)]
move `lints()` to `iter_count.rs`

3 years agolint for `into_iter().count()`
Takayuki Maeda [Thu, 25 Feb 2021 16:54:51 +0000 (01:54 +0900)]
lint for `into_iter().count()`

3 years agoallow clippy::iter_count
Takayuki Maeda [Thu, 25 Feb 2021 14:07:15 +0000 (23:07 +0900)]
allow clippy::iter_count

3 years agonew lint: iter_count
Takayuki Maeda [Thu, 25 Feb 2021 14:06:50 +0000 (23:06 +0900)]
new lint: iter_count

3 years agoAuto merge of #6730 - anall:feature/owned_to_owned_methods, r=camsteffen
bors [Sat, 27 Feb 2021 01:40:05 +0000 (01:40 +0000)]
Auto merge of #6730 - anall:feature/owned_to_owned_methods, r=camsteffen

added new lint `owned_to_owned`

Adding new lint `owned_to_owned`

Creating draft PR to have this looked over.
I think this takes all advice I received into account.

I did have to update the `redundant_clone` test to ignore this lint -- I felt that was the safest action.

closes: #6715
changelog: added new lint `implicit_clone`

3 years agoadded new lint `implicit_clone`
Andrea Nall [Fri, 12 Feb 2021 04:27:04 +0000 (04:27 +0000)]
added new lint `implicit_clone`

3 years agoRevert #6796: Downgrade manual_map to nursery
Jason Newcomb [Fri, 26 Feb 2021 21:27:41 +0000 (16:27 -0500)]
Revert #6796: Downgrade manual_map to nursery

3 years agoFix `manual_map`: don't lint when partially moved values are used.
Jason Newcomb [Fri, 26 Feb 2021 16:50:12 +0000 (11:50 -0500)]
Fix `manual_map`: don't lint when partially moved values are used.
Fix `manual_map`: don't lint when `return`, `break`, and `continue` are used.

3 years agoAuto merge of #6800 - matthiaskrgr:lintcheck_stats, r=llogiq
bors [Fri, 26 Feb 2021 19:30:57 +0000 (19:30 +0000)]
Auto merge of #6800 - matthiaskrgr:lintcheck_stats, r=llogiq

lintcheck: print stats how lint counts change

The stats look like this:
````
Stats:
clippy::manual_map 0 => 10
clippy::missing_panics_doc 54 => 56
clippy::upper_case_acronyms 18 => 4
````

changelog: lintcheck: print stats about changing lint counts in the log

3 years agoRevert "Fix versioncheck test"
Cameron Steffen [Fri, 26 Feb 2021 18:30:43 +0000 (12:30 -0600)]
Revert "Fix versioncheck test"

This reverts commit 1e7b1ccb2a05f80ae0a580401e7565fb1c0a4917.

3 years agoAdd package arguments to dogfood test
Cameron Steffen [Fri, 26 Feb 2021 18:12:33 +0000 (12:12 -0600)]
Add package arguments to dogfood test

This is necessary after migrating to RUSTC_WORKSPACE_WRAPPER.

3 years agoRevert "Add workspace to manifest"
Cameron Steffen [Fri, 26 Feb 2021 18:11:47 +0000 (12:11 -0600)]
Revert "Add workspace to manifest"

This reverts commit 9bcb257985d5a16355bdd62998935f16d09b42e2.

3 years agoRevert "Fix lintcheck by excluding checked crates from workspace"
Cameron Steffen [Fri, 26 Feb 2021 18:11:35 +0000 (12:11 -0600)]
Revert "Fix lintcheck by excluding checked crates from workspace"

This reverts commit aea55d2c6239e42a0a337d610d19061521565615.

3 years agoRevert "Test workspace at once"
Cameron Steffen [Fri, 26 Feb 2021 18:10:24 +0000 (12:10 -0600)]
Revert "Test workspace at once"

This reverts commit e355652fec704f307b50d42fb6a08172dc1e08bf.

3 years agoAuto merge of #6796 - dtolnay-contrib:manualmap, r=flip1995
bors [Fri, 26 Feb 2021 15:28:10 +0000 (15:28 +0000)]
Auto merge of #6796 - dtolnay-contrib:manualmap, r=flip1995

Downgrade manual_map to nursery

I believe #6795 should be considered a blocker for this lint to be considered for enabling by default.

---

changelog: remove manual_map from default list of enabled lints

3 years agolintcheck: update logs and do minor fixes
Matthias Krüger [Fri, 26 Feb 2021 10:18:59 +0000 (11:18 +0100)]
lintcheck: update logs and do minor fixes

3 years agolintcheck: print stats how lint counts have changed between runs
Matthias Krüger [Tue, 23 Feb 2021 20:23:36 +0000 (21:23 +0100)]
lintcheck: print stats how lint counts have changed between runs

3 years agolintcheck: fix bug when getting the config toml path.
Matthias Krüger [Tue, 23 Feb 2021 20:27:32 +0000 (21:27 +0100)]
lintcheck: fix bug when getting the config toml path.

In order to check if we need to recheck crates, I was getting the path from clap only
which is None if we don't pass it via cmdline args.

Use the dedicated lintcheck_config_toml() fnuction instead!

3 years agoDowngrade manual_map to nursery
David Tolnay [Fri, 26 Feb 2021 04:31:24 +0000 (20:31 -0800)]
Downgrade manual_map to nursery

3 years agoAuto merge of #6601 - mdm:fix-unit-args-false-positive, r=camsteffen
bors [Thu, 25 Feb 2021 21:16:02 +0000 (21:16 +0000)]
Auto merge of #6601 - mdm:fix-unit-args-false-positive, r=camsteffen

Fix false positive for unit_arg lint

Fixes #6447

To avoid false positives don't complain about unit args when they come from a path expression, e.g. a local variable.

**Note:** This is my first contribution to Clippy, so I might have messed up somewhere. Any feedback is welcome and I'm happy to work out any kinks.

---

changelog: Do not lint unit arguments when they come from a path expression.

3 years agoAdd original test case from issue
Marc Dominik Migge [Thu, 25 Feb 2021 21:03:11 +0000 (22:03 +0100)]
Add original test case from issue

3 years agoAuto merge of #6790 - mgacek8:issue_6748, r=Manishearth
bors [Thu, 25 Feb 2021 15:05:06 +0000 (15:05 +0000)]
Auto merge of #6790 - mgacek8:issue_6748, r=Manishearth

or_fun_call: fix suggestion for `or_insert(vec![])`

fixes #6748
changelog: or_fun_call: fix suggestion for `or_insert(vec![])` on `std::collections::hash_map::Entry` or `std::collections::btree_map::Entry`

3 years agoor_fun_call: fix suggestion for `or_insert(vec![])`
Mateusz Gacek [Wed, 24 Feb 2021 20:06:26 +0000 (21:06 +0100)]
or_fun_call: fix suggestion for `or_insert(vec![])`

Applies for `std::collections::hash_map::Entry` and `std::collections::btree_map::Entry`

Example:
Previously, for the following code:
`let _ = hash_map.entry("test".to_owned()).or_insert(vec![]);`
clippy would suggest to use:
`or_insert_with(vec![])`, which causes a compiler error (E0277).

Now clippy suggests:
`or_insert_with(Vec::new)`