Skip to content

Commit 68a698b

Browse files
committed
Auto merge of #90126 - flip1995:clippyup, r=Manishearth
Update Clippy r? `@Manishearth` This adds a new dep to Clippy: [indoc](https://crates.io/crates/indoc) And transitively: [unindent](https://crates.io/crates/unindent)
2 parents 547a6ff + 8d5f69d commit 68a698b

File tree

128 files changed

+4353
-631
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+4353
-631
lines changed

Cargo.lock

+19-3
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ dependencies = [
555555

556556
[[package]]
557557
name = "clippy"
558-
version = "0.1.57"
558+
version = "0.1.58"
559559
dependencies = [
560560
"cargo_metadata 0.12.0",
561561
"clippy_lints",
@@ -582,6 +582,7 @@ version = "0.0.1"
582582
dependencies = [
583583
"bytecount",
584584
"clap",
585+
"indoc",
585586
"itertools 0.10.1",
586587
"opener",
587588
"regex",
@@ -591,7 +592,7 @@ dependencies = [
591592

592593
[[package]]
593594
name = "clippy_lints"
594-
version = "0.1.57"
595+
version = "0.1.58"
595596
dependencies = [
596597
"cargo_metadata 0.12.0",
597598
"clippy_utils",
@@ -612,7 +613,7 @@ dependencies = [
612613

613614
[[package]]
614615
name = "clippy_utils"
615-
version = "0.1.57"
616+
version = "0.1.58"
616617
dependencies = [
617618
"if_chain",
618619
"rustc-semver",
@@ -1665,6 +1666,15 @@ dependencies = [
16651666
"serde",
16661667
]
16671668

1669+
[[package]]
1670+
name = "indoc"
1671+
version = "1.0.3"
1672+
source = "registry+https://github.com/rust-lang/crates.io-index"
1673+
checksum = "e5a75aeaaef0ce18b58056d306c27b07436fbb34b8816c53094b76dd81803136"
1674+
dependencies = [
1675+
"unindent",
1676+
]
1677+
16681678
[[package]]
16691679
name = "installer"
16701680
version = "0.0.0"
@@ -5593,6 +5603,12 @@ dependencies = [
55935603
"diff",
55945604
]
55955605

5606+
[[package]]
5607+
name = "unindent"
5608+
version = "0.1.7"
5609+
source = "registry+https://github.com/rust-lang/crates.io-index"
5610+
checksum = "f14ee04d9415b52b3aeab06258a3f07093182b88ba0f9b8d203f211a7a7d41c7"
5611+
55965612
[[package]]
55975613
name = "unstable-book-gen"
55985614
version = "0.1.0"

src/tools/clippy/CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -2730,11 +2730,13 @@ Released 2018-09-13
27302730
[`fn_address_comparisons`]: https://rust-lang.github.io/rust-clippy/master/index.html#fn_address_comparisons
27312731
[`fn_params_excessive_bools`]: https://rust-lang.github.io/rust-clippy/master/index.html#fn_params_excessive_bools
27322732
[`fn_to_numeric_cast`]: https://rust-lang.github.io/rust-clippy/master/index.html#fn_to_numeric_cast
2733+
[`fn_to_numeric_cast_any`]: https://rust-lang.github.io/rust-clippy/master/index.html#fn_to_numeric_cast_any
27332734
[`fn_to_numeric_cast_with_truncation`]: https://rust-lang.github.io/rust-clippy/master/index.html#fn_to_numeric_cast_with_truncation
27342735
[`for_kv_map`]: https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map
27352736
[`for_loops_over_fallibles`]: https://rust-lang.github.io/rust-clippy/master/index.html#for_loops_over_fallibles
27362737
[`forget_copy`]: https://rust-lang.github.io/rust-clippy/master/index.html#forget_copy
27372738
[`forget_ref`]: https://rust-lang.github.io/rust-clippy/master/index.html#forget_ref
2739+
[`format_in_format_args`]: https://rust-lang.github.io/rust-clippy/master/index.html#format_in_format_args
27382740
[`from_iter_instead_of_collect`]: https://rust-lang.github.io/rust-clippy/master/index.html#from_iter_instead_of_collect
27392741
[`from_over_into`]: https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into
27402742
[`from_str_radix_10`]: https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10
@@ -2836,6 +2838,7 @@ Released 2018-09-13
28362838
[`match_result_ok`]: https://rust-lang.github.io/rust-clippy/master/index.html#match_result_ok
28372839
[`match_same_arms`]: https://rust-lang.github.io/rust-clippy/master/index.html#match_same_arms
28382840
[`match_single_binding`]: https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding
2841+
[`match_str_case_mismatch`]: https://rust-lang.github.io/rust-clippy/master/index.html#match_str_case_mismatch
28392842
[`match_wild_err_arm`]: https://rust-lang.github.io/rust-clippy/master/index.html#match_wild_err_arm
28402843
[`match_wildcard_for_single_variants`]: https://rust-lang.github.io/rust-clippy/master/index.html#match_wildcard_for_single_variants
28412844
[`maybe_infinite_iter`]: https://rust-lang.github.io/rust-clippy/master/index.html#maybe_infinite_iter
@@ -2896,6 +2899,7 @@ Released 2018-09-13
28962899
[`new_ret_no_self`]: https://rust-lang.github.io/rust-clippy/master/index.html#new_ret_no_self
28972900
[`new_without_default`]: https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
28982901
[`no_effect`]: https://rust-lang.github.io/rust-clippy/master/index.html#no_effect
2902+
[`no_effect_underscore_binding`]: https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
28992903
[`non_ascii_literal`]: https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal
29002904
[`non_octal_unix_permissions`]: https://rust-lang.github.io/rust-clippy/master/index.html#non_octal_unix_permissions
29012905
[`non_send_fields_in_send_ty`]: https://rust-lang.github.io/rust-clippy/master/index.html#non_send_fields_in_send_ty
@@ -3012,16 +3016,19 @@ Released 2018-09-13
30123016
[`temporary_assignment`]: https://rust-lang.github.io/rust-clippy/master/index.html#temporary_assignment
30133017
[`to_digit_is_some`]: https://rust-lang.github.io/rust-clippy/master/index.html#to_digit_is_some
30143018
[`to_string_in_display`]: https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_display
3019+
[`to_string_in_format_args`]: https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args
30153020
[`todo`]: https://rust-lang.github.io/rust-clippy/master/index.html#todo
30163021
[`too_many_arguments`]: https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
30173022
[`too_many_lines`]: https://rust-lang.github.io/rust-clippy/master/index.html#too_many_lines
30183023
[`toplevel_ref_arg`]: https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg
3024+
[`trailing_empty_array`]: https://rust-lang.github.io/rust-clippy/master/index.html#trailing_empty_array
30193025
[`trait_duplication_in_bounds`]: https://rust-lang.github.io/rust-clippy/master/index.html#trait_duplication_in_bounds
30203026
[`transmute_bytes_to_str`]: https://rust-lang.github.io/rust-clippy/master/index.html#transmute_bytes_to_str
30213027
[`transmute_float_to_int`]: https://rust-lang.github.io/rust-clippy/master/index.html#transmute_float_to_int
30223028
[`transmute_int_to_bool`]: https://rust-lang.github.io/rust-clippy/master/index.html#transmute_int_to_bool
30233029
[`transmute_int_to_char`]: https://rust-lang.github.io/rust-clippy/master/index.html#transmute_int_to_char
30243030
[`transmute_int_to_float`]: https://rust-lang.github.io/rust-clippy/master/index.html#transmute_int_to_float
3031+
[`transmute_num_to_bytes`]: https://rust-lang.github.io/rust-clippy/master/index.html#transmute_num_to_bytes
30253032
[`transmute_ptr_to_ptr`]: https://rust-lang.github.io/rust-clippy/master/index.html#transmute_ptr_to_ptr
30263033
[`transmute_ptr_to_ref`]: https://rust-lang.github.io/rust-clippy/master/index.html#transmute_ptr_to_ref
30273034
[`transmutes_expressible_as_ptr_casts`]: https://rust-lang.github.io/rust-clippy/master/index.html#transmutes_expressible_as_ptr_casts
@@ -3031,10 +3038,12 @@ Released 2018-09-13
30313038
[`try_err`]: https://rust-lang.github.io/rust-clippy/master/index.html#try_err
30323039
[`type_complexity`]: https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
30333040
[`type_repetition_in_bounds`]: https://rust-lang.github.io/rust-clippy/master/index.html#type_repetition_in_bounds
3041+
[`undocumented_unsafe_blocks`]: https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
30343042
[`undropped_manually_drops`]: https://rust-lang.github.io/rust-clippy/master/index.html#undropped_manually_drops
30353043
[`unicode_not_nfc`]: https://rust-lang.github.io/rust-clippy/master/index.html#unicode_not_nfc
30363044
[`unimplemented`]: https://rust-lang.github.io/rust-clippy/master/index.html#unimplemented
30373045
[`uninit_assumed_init`]: https://rust-lang.github.io/rust-clippy/master/index.html#uninit_assumed_init
3046+
[`uninit_vec`]: https://rust-lang.github.io/rust-clippy/master/index.html#uninit_vec
30383047
[`unit_arg`]: https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
30393048
[`unit_cmp`]: https://rust-lang.github.io/rust-clippy/master/index.html#unit_cmp
30403049
[`unit_return_expecting_ord`]: https://rust-lang.github.io/rust-clippy/master/index.html#unit_return_expecting_ord

src/tools/clippy/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "clippy"
3-
version = "0.1.57"
3+
version = "0.1.58"
44
description = "A bunch of helpful lints to avoid common pitfalls in Rust"
55
repository = "https://github.com/rust-lang/rust-clippy"
66
readme = "README.md"

src/tools/clippy/clippy_dev/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ edition = "2021"
66
[dependencies]
77
bytecount = "0.6"
88
clap = "2.33"
9+
indoc = "1.0"
910
itertools = "0.10"
1011
opener = "0.5"
1112
regex = "1.5"

src/tools/clippy/clippy_dev/src/main.rs

+6
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ fn main() {
2828
matches.value_of("pass"),
2929
matches.value_of("name"),
3030
matches.value_of("category"),
31+
matches.is_present("msrv"),
3132
) {
3233
Ok(_) => update_lints::run(update_lints::UpdateMode::Change),
3334
Err(e) => eprintln!("Unable to create lint: {}", e),
@@ -147,6 +148,11 @@ fn get_clap_config<'a>() -> ArgMatches<'a> {
147148
"internal_warn",
148149
])
149150
.takes_value(true),
151+
)
152+
.arg(
153+
Arg::with_name("msrv")
154+
.long("msrv")
155+
.help("Add MSRV config code to the lint"),
150156
),
151157
)
152158
.subcommand(

0 commit comments

Comments
 (0)