Skip to content

Update Clippy to 43a1777 #72118

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 53 commits into from
May 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
ad9ad6f
Don't negate resulted offsets when `offset` is subtraction by 0
rail-rain Apr 27, 2020
37261a9
Print 0 when `end` and `offset` is 0, and also simplify the suggestion
rail-rain Apr 27, 2020
75ad839
Do not trigger `manual_memcpy` for `RangeTo`
rail-rain Apr 27, 2020
c94f0f4
Remove all `ref` keyword
rail-rain Apr 27, 2020
7dd0f34
Refactor `if` to use `else` and iterator combinators
rail-rain Apr 27, 2020
3f1e51b
Rename `negate` to `sign` and make it strong types then make `art1` &str
rail-rain Apr 27, 2020
ecb472c
Use `fn` instead of closures where unnecessary
rail-rain Apr 27, 2020
aab80ee
Extract `get_fixed_offset_var`` from `fetch_cloned_fixed_offset_var`
rail-rain Apr 27, 2020
3d121d5
Extract roles getting indexes from `get_indexed_assignments`
rail-rain Apr 27, 2020
4f2617c
Separate getting offsets and getting index expressions
rail-rain Apr 27, 2020
9fc6f37
Delay getting the snippet from slices
rail-rain Apr 27, 2020
582614f
Extract building the suggestion of `manual_memcpy`
rail-rain Apr 27, 2020
be9f7c2
Merge branch 'master' into fix_manual_memcpy
rail-rain Apr 27, 2020
51585a1
Removed unused lifetimes and a needless bool
rail-rain Apr 27, 2020
1afb6e6
Extend example for the `unneeded_field_pattern` lint
stanislav-tkach Apr 28, 2020
461f4a3
Add missing tests
rail-rain Apr 30, 2020
f072ded
Implement the manual_non_exhaustive lint
ebroto Apr 30, 2020
42b0b47
Apply suggestions from PR review
ebroto May 1, 2020
10e3f9b
Move match_on_vec_items to pedantic
flip1995 May 1, 2020
350c17d
Use the only variant left instead of a wildcard
ebroto May 1, 2020
e3b8c41
Auto merge of #5536 - rail-rain:fix_manual_memcpy, r=phansch
bors May 2, 2020
991efa6
Auto merge of #5555 - flip1995:pedantic_match_on_vec_items, r=phansch
bors May 2, 2020
72ce6d5
Fix unwrap lint when checks are done in parameters
ThibsG Apr 24, 2020
d0c1f8a
fix fp on while-let-on-iterator
alex-700 May 2, 2020
e7138e0
Fix match on vec items: match on vec[..]
CrazyRoka May 2, 2020
cc9088f
Auto merge of #5550 - ebroto:manual_non_exhaustive, r=flip1995
bors May 2, 2020
de58c56
Changed RANGE_FULL constant in utils
CrazyRoka May 2, 2020
60538d6
Auto merge of #5559 - alex-700:fix-while-let-on-iterator-fp, r=flip1995
bors May 2, 2020
75a7171
Auto merge of #5558 - ThibsG:FixUnwrapInArgs, r=flip1995
bors May 2, 2020
76ddac5
Auto merge of #5560 - CrazyRoka:fix-match-on-vector-full-range, r=pha…
bors May 2, 2020
7744cf4
Update to rustc changes
oli-obk May 4, 2020
780a63a
Update ui tests
oli-obk May 5, 2020
b63868d
Auto merge of #5566 - oli-obk:sync-from-rustc, r=flip1995
bors May 6, 2020
3b58d66
Add the manual_async_fn lint
ebroto May 7, 2020
4ac348b
Fix doc comment in lint declaration
ebroto May 7, 2020
3e4bc02
Apply suggestions from PR review
ebroto May 7, 2020
78b7d49
Auto merge of #5576 - ebroto:manual_async_fn, r=flip1995
bors May 8, 2020
ceddf34
Auto merge of #5541 - DarkEld3r:patch-1, r=flip1995
bors May 8, 2020
4388773
deps: remove unused regex dependency from root crate
matthiaskrgr May 8, 2020
43d9cdc
Auto merge of #5580 - matthiaskrgr:regex_dep, r=flip1995
bors May 9, 2020
0c14ea8
Allow 'use super::*;' imports
MrAwesome May 3, 2020
bdc75db
Run `cargo dev fmt`
MrAwesome May 3, 2020
56f4e1c
Check if the parent module name contains "test"
MrAwesome May 7, 2020
ad92486
Add check for "test" in parent name. Include flag for disabling wildc…
MrAwesome May 7, 2020
a42a2bd
Also have flag disable macro check
MrAwesome May 7, 2020
152cdcb
Remove unnecessary field, check for Mod/Fn ItemKind
MrAwesome May 9, 2020
4db6abc
Remove check for Fn, reflect this in test cases, make test cases more…
MrAwesome May 9, 2020
a339766
Fix test from auto-formatter fix
MrAwesome May 9, 2020
0ba61c6
Check is_macro inside check_exceptions, update references to fix test
MrAwesome May 9, 2020
b69200b
Move is_test_module check to top of function
MrAwesome May 9, 2020
43a1777
Auto merge of #5564 - MrAwesome:master, r=flip1995
bors May 9, 2020
9dd5b2d
Merge commit '43a1777b89cf6791f9e20878b4e5e3ae907867a5' into clippyup
flip1995 May 11, 2020
10f3cd9
Update Cargo.lock
flip1995 May 11, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,6 @@ dependencies = [
"compiletest_rs",
"derive-new",
"lazy_static 1.4.0",
"regex",
"rustc-workspace-hack",
"rustc_tools_util 0.2.0",
"semver",
Expand Down
2 changes: 2 additions & 0 deletions src/tools/clippy/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -1422,7 +1422,9 @@ Released 2018-09-13
[`lossy_float_literal`]: https://rust-lang.github.io/rust-clippy/master/index.html#lossy_float_literal
[`macro_use_imports`]: https://rust-lang.github.io/rust-clippy/master/index.html#macro_use_imports
[`main_recursion`]: https://rust-lang.github.io/rust-clippy/master/index.html#main_recursion
[`manual_async_fn`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_async_fn
[`manual_memcpy`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_memcpy
[`manual_non_exhaustive`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_non_exhaustive
[`manual_saturating_arithmetic`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_saturating_arithmetic
[`manual_swap`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_swap
[`many_single_char_names`]: https://rust-lang.github.io/rust-clippy/master/index.html#many_single_char_names
Expand Down
1 change: 0 additions & 1 deletion src/tools/clippy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ path = "src/driver.rs"
# begin automatic update
clippy_lints = { version = "0.0.212", path = "clippy_lints" }
# end automatic update
regex = "1"
semver = "0.9"
rustc_tools_util = { version = "0.2.0", path = "rustc_tools_util"}
tempfile = { version = "3.1.0", optional = true }
Expand Down
16 changes: 13 additions & 3 deletions src/tools/clippy/clippy_lints/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,8 @@ mod literal_representation;
mod loops;
mod macro_use;
mod main_recursion;
mod manual_async_fn;
mod manual_non_exhaustive;
mod map_clone;
mod map_unit_fn;
mod match_on_vec_items;
Expand Down Expand Up @@ -628,6 +630,8 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
&loops::WHILE_LET_ON_ITERATOR,
&macro_use::MACRO_USE_IMPORTS,
&main_recursion::MAIN_RECURSION,
&manual_async_fn::MANUAL_ASYNC_FN,
&manual_non_exhaustive::MANUAL_NON_EXHAUSTIVE,
&map_clone::MAP_CLONE,
&map_unit_fn::OPTION_MAP_UNIT_FN,
&map_unit_fn::RESULT_MAP_UNIT_FN,
Expand Down Expand Up @@ -1054,7 +1058,8 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
let max_struct_bools = conf.max_struct_bools;
store.register_early_pass(move || box excessive_bools::ExcessiveBools::new(max_struct_bools, max_fn_params_bools));
store.register_early_pass(|| box option_env_unwrap::OptionEnvUnwrap);
store.register_late_pass(|| box wildcard_imports::WildcardImports);
let warn_on_all_wildcard_imports = conf.warn_on_all_wildcard_imports;
store.register_late_pass(move || box wildcard_imports::WildcardImports::new(warn_on_all_wildcard_imports));
store.register_early_pass(|| box macro_use::MacroUseImports);
store.register_late_pass(|| box verbose_file_reads::VerboseFileReads);
store.register_late_pass(|| box redundant_pub_crate::RedundantPubCrate::default());
Expand All @@ -1064,6 +1069,8 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
store.register_late_pass(|| box utils::internal_lints::CollapsibleCalls);
store.register_late_pass(|| box if_let_mutex::IfLetMutex);
store.register_late_pass(|| box match_on_vec_items::MatchOnVecItems);
store.register_early_pass(|| box manual_non_exhaustive::ManualNonExhaustive);
store.register_late_pass(|| box manual_async_fn::ManualAsyncFn);

store.register_group(true, "clippy::restriction", Some("clippy_restriction"), vec![
LintId::of(&arithmetic::FLOAT_ARITHMETIC),
Expand Down Expand Up @@ -1138,6 +1145,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
LintId::of(&loops::EXPLICIT_INTO_ITER_LOOP),
LintId::of(&loops::EXPLICIT_ITER_LOOP),
LintId::of(&macro_use::MACRO_USE_IMPORTS),
LintId::of(&match_on_vec_items::MATCH_ON_VEC_ITEMS),
LintId::of(&matches::MATCH_BOOL),
LintId::of(&matches::SINGLE_MATCH_ELSE),
LintId::of(&methods::FILTER_MAP),
Expand Down Expand Up @@ -1280,10 +1288,11 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
LintId::of(&loops::WHILE_LET_LOOP),
LintId::of(&loops::WHILE_LET_ON_ITERATOR),
LintId::of(&main_recursion::MAIN_RECURSION),
LintId::of(&manual_async_fn::MANUAL_ASYNC_FN),
LintId::of(&manual_non_exhaustive::MANUAL_NON_EXHAUSTIVE),
LintId::of(&map_clone::MAP_CLONE),
LintId::of(&map_unit_fn::OPTION_MAP_UNIT_FN),
LintId::of(&map_unit_fn::RESULT_MAP_UNIT_FN),
LintId::of(&match_on_vec_items::MATCH_ON_VEC_ITEMS),
LintId::of(&matches::INFALLIBLE_DESTRUCTURING_MATCH),
LintId::of(&matches::MATCH_AS_REF),
LintId::of(&matches::MATCH_OVERLAPPING_ARM),
Expand Down Expand Up @@ -1474,6 +1483,8 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
LintId::of(&loops::NEEDLESS_RANGE_LOOP),
LintId::of(&loops::WHILE_LET_ON_ITERATOR),
LintId::of(&main_recursion::MAIN_RECURSION),
LintId::of(&manual_async_fn::MANUAL_ASYNC_FN),
LintId::of(&manual_non_exhaustive::MANUAL_NON_EXHAUSTIVE),
LintId::of(&map_clone::MAP_CLONE),
LintId::of(&matches::INFALLIBLE_DESTRUCTURING_MATCH),
LintId::of(&matches::MATCH_OVERLAPPING_ARM),
Expand Down Expand Up @@ -1647,7 +1658,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
LintId::of(&loops::NEVER_LOOP),
LintId::of(&loops::REVERSE_RANGE_LOOP),
LintId::of(&loops::WHILE_IMMUTABLE_CONDITION),
LintId::of(&match_on_vec_items::MATCH_ON_VEC_ITEMS),
LintId::of(&mem_discriminant::MEM_DISCRIMINANT_NON_ENUM),
LintId::of(&mem_replace::MEM_REPLACE_WITH_UNINIT),
LintId::of(&methods::CLONE_DOUBLE_REF),
Expand Down
Loading