Skip to content

Commit 94c0ab9

Browse files
committed
Auto merge of #72118 - flip1995:clippyup, r=oli-obk
Update Clippy to 43a1777 Updates Clippy to rust-lang/rust-clippy@43a1777 We should establish a process on how often and when to update Clippy. (After X feature PRs? Once per week? Only on bug fixes and in the release week? ...?) r? @oli-obk
2 parents 75e1463 + 10f3cd9 commit 94c0ab9

35 files changed

+1574
-258
lines changed

Cargo.lock

-1
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,6 @@ dependencies = [
537537
"compiletest_rs",
538538
"derive-new",
539539
"lazy_static 1.4.0",
540-
"regex",
541540
"rustc-workspace-hack",
542541
"rustc_tools_util 0.2.0",
543542
"semver",

src/tools/clippy/CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -1422,7 +1422,9 @@ Released 2018-09-13
14221422
[`lossy_float_literal`]: https://rust-lang.github.io/rust-clippy/master/index.html#lossy_float_literal
14231423
[`macro_use_imports`]: https://rust-lang.github.io/rust-clippy/master/index.html#macro_use_imports
14241424
[`main_recursion`]: https://rust-lang.github.io/rust-clippy/master/index.html#main_recursion
1425+
[`manual_async_fn`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_async_fn
14251426
[`manual_memcpy`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_memcpy
1427+
[`manual_non_exhaustive`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_non_exhaustive
14261428
[`manual_saturating_arithmetic`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_saturating_arithmetic
14271429
[`manual_swap`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_swap
14281430
[`many_single_char_names`]: https://rust-lang.github.io/rust-clippy/master/index.html#many_single_char_names

src/tools/clippy/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ path = "src/driver.rs"
3131
# begin automatic update
3232
clippy_lints = { version = "0.0.212", path = "clippy_lints" }
3333
# end automatic update
34-
regex = "1"
3534
semver = "0.9"
3635
rustc_tools_util = { version = "0.2.0", path = "rustc_tools_util"}
3736
tempfile = { version = "3.1.0", optional = true }

src/tools/clippy/clippy_lints/src/lib.rs

+13-3
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,8 @@ mod literal_representation;
247247
mod loops;
248248
mod macro_use;
249249
mod main_recursion;
250+
mod manual_async_fn;
251+
mod manual_non_exhaustive;
250252
mod map_clone;
251253
mod map_unit_fn;
252254
mod match_on_vec_items;
@@ -628,6 +630,8 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
628630
&loops::WHILE_LET_ON_ITERATOR,
629631
&macro_use::MACRO_USE_IMPORTS,
630632
&main_recursion::MAIN_RECURSION,
633+
&manual_async_fn::MANUAL_ASYNC_FN,
634+
&manual_non_exhaustive::MANUAL_NON_EXHAUSTIVE,
631635
&map_clone::MAP_CLONE,
632636
&map_unit_fn::OPTION_MAP_UNIT_FN,
633637
&map_unit_fn::RESULT_MAP_UNIT_FN,
@@ -1054,7 +1058,8 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
10541058
let max_struct_bools = conf.max_struct_bools;
10551059
store.register_early_pass(move || box excessive_bools::ExcessiveBools::new(max_struct_bools, max_fn_params_bools));
10561060
store.register_early_pass(|| box option_env_unwrap::OptionEnvUnwrap);
1057-
store.register_late_pass(|| box wildcard_imports::WildcardImports);
1061+
let warn_on_all_wildcard_imports = conf.warn_on_all_wildcard_imports;
1062+
store.register_late_pass(move || box wildcard_imports::WildcardImports::new(warn_on_all_wildcard_imports));
10581063
store.register_early_pass(|| box macro_use::MacroUseImports);
10591064
store.register_late_pass(|| box verbose_file_reads::VerboseFileReads);
10601065
store.register_late_pass(|| box redundant_pub_crate::RedundantPubCrate::default());
@@ -1064,6 +1069,8 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
10641069
store.register_late_pass(|| box utils::internal_lints::CollapsibleCalls);
10651070
store.register_late_pass(|| box if_let_mutex::IfLetMutex);
10661071
store.register_late_pass(|| box match_on_vec_items::MatchOnVecItems);
1072+
store.register_early_pass(|| box manual_non_exhaustive::ManualNonExhaustive);
1073+
store.register_late_pass(|| box manual_async_fn::ManualAsyncFn);
10671074

10681075
store.register_group(true, "clippy::restriction", Some("clippy_restriction"), vec![
10691076
LintId::of(&arithmetic::FLOAT_ARITHMETIC),
@@ -1138,6 +1145,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
11381145
LintId::of(&loops::EXPLICIT_INTO_ITER_LOOP),
11391146
LintId::of(&loops::EXPLICIT_ITER_LOOP),
11401147
LintId::of(&macro_use::MACRO_USE_IMPORTS),
1148+
LintId::of(&match_on_vec_items::MATCH_ON_VEC_ITEMS),
11411149
LintId::of(&matches::MATCH_BOOL),
11421150
LintId::of(&matches::SINGLE_MATCH_ELSE),
11431151
LintId::of(&methods::FILTER_MAP),
@@ -1280,10 +1288,11 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
12801288
LintId::of(&loops::WHILE_LET_LOOP),
12811289
LintId::of(&loops::WHILE_LET_ON_ITERATOR),
12821290
LintId::of(&main_recursion::MAIN_RECURSION),
1291+
LintId::of(&manual_async_fn::MANUAL_ASYNC_FN),
1292+
LintId::of(&manual_non_exhaustive::MANUAL_NON_EXHAUSTIVE),
12831293
LintId::of(&map_clone::MAP_CLONE),
12841294
LintId::of(&map_unit_fn::OPTION_MAP_UNIT_FN),
12851295
LintId::of(&map_unit_fn::RESULT_MAP_UNIT_FN),
1286-
LintId::of(&match_on_vec_items::MATCH_ON_VEC_ITEMS),
12871296
LintId::of(&matches::INFALLIBLE_DESTRUCTURING_MATCH),
12881297
LintId::of(&matches::MATCH_AS_REF),
12891298
LintId::of(&matches::MATCH_OVERLAPPING_ARM),
@@ -1474,6 +1483,8 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
14741483
LintId::of(&loops::NEEDLESS_RANGE_LOOP),
14751484
LintId::of(&loops::WHILE_LET_ON_ITERATOR),
14761485
LintId::of(&main_recursion::MAIN_RECURSION),
1486+
LintId::of(&manual_async_fn::MANUAL_ASYNC_FN),
1487+
LintId::of(&manual_non_exhaustive::MANUAL_NON_EXHAUSTIVE),
14771488
LintId::of(&map_clone::MAP_CLONE),
14781489
LintId::of(&matches::INFALLIBLE_DESTRUCTURING_MATCH),
14791490
LintId::of(&matches::MATCH_OVERLAPPING_ARM),
@@ -1647,7 +1658,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
16471658
LintId::of(&loops::NEVER_LOOP),
16481659
LintId::of(&loops::REVERSE_RANGE_LOOP),
16491660
LintId::of(&loops::WHILE_IMMUTABLE_CONDITION),
1650-
LintId::of(&match_on_vec_items::MATCH_ON_VEC_ITEMS),
16511661
LintId::of(&mem_discriminant::MEM_DISCRIMINANT_NON_ENUM),
16521662
LintId::of(&mem_replace::MEM_REPLACE_WITH_UNINIT),
16531663
LintId::of(&methods::CLONE_DOUBLE_REF),

0 commit comments

Comments
 (0)