Skip to content

Commit 38352b0

Browse files
committed
Auto merge of rust-lang#130778 - flip1995:clippy-subtree-update, r=Manishearth
Clippy subtree update r? `@Manishearth` Really delayed sync (2 1/2 weeks), because of a `debug_assertion` we hit, and I didn't have the time to investigate earlier. It would be nice to merge this PR with some priority, as it includes a lot of formatting changes due to the rustfmt bump. Include Cargo.lock update due to Clippy version bump and ui_test bump in Clippy.
2 parents 2933f68 + e60098b commit 38352b0

File tree

567 files changed

+7437
-2606
lines changed

Some content is hidden

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

567 files changed

+7437
-2606
lines changed

Cargo.lock

+7-34
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97"
524524

525525
[[package]]
526526
name = "clippy"
527-
version = "0.1.82"
527+
version = "0.1.83"
528528
dependencies = [
529529
"anstream",
530530
"cargo_metadata 0.18.1",
@@ -547,13 +547,13 @@ dependencies = [
547547
"termize",
548548
"tokio",
549549
"toml 0.7.8",
550-
"ui_test 0.25.0",
550+
"ui_test",
551551
"walkdir",
552552
]
553553

554554
[[package]]
555555
name = "clippy_config"
556-
version = "0.1.82"
556+
version = "0.1.83"
557557
dependencies = [
558558
"itertools",
559559
"serde",
@@ -576,7 +576,7 @@ dependencies = [
576576

577577
[[package]]
578578
name = "clippy_lints"
579-
version = "0.1.82"
579+
version = "0.1.83"
580580
dependencies = [
581581
"arrayvec",
582582
"cargo_metadata 0.18.1",
@@ -600,7 +600,7 @@ dependencies = [
600600

601601
[[package]]
602602
name = "clippy_utils"
603-
version = "0.1.82"
603+
version = "0.1.83"
604604
dependencies = [
605605
"arrayvec",
606606
"clippy_config",
@@ -902,7 +902,7 @@ dependencies = [
902902

903903
[[package]]
904904
name = "declare_clippy_lint"
905-
version = "0.1.82"
905+
version = "0.1.83"
906906
dependencies = [
907907
"itertools",
908908
"quote",
@@ -2269,7 +2269,7 @@ dependencies = [
22692269
"rustc_version",
22702270
"smallvec",
22712271
"tempfile",
2272-
"ui_test 0.26.5",
2272+
"ui_test",
22732273
"windows-sys 0.52.0",
22742274
]
22752275

@@ -5485,33 +5485,6 @@ version = "0.1.6"
54855485
source = "registry+https://github.com/rust-lang/crates.io-index"
54865486
checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9"
54875487

5488-
[[package]]
5489-
name = "ui_test"
5490-
version = "0.25.0"
5491-
source = "registry+https://github.com/rust-lang/crates.io-index"
5492-
checksum = "f7e4f339f62edc873975c47115f9e71c5454ddaa37c1142b42fc0b2672c8dacb"
5493-
dependencies = [
5494-
"annotate-snippets 0.11.4",
5495-
"anyhow",
5496-
"bstr",
5497-
"cargo-platform",
5498-
"cargo_metadata 0.18.1",
5499-
"color-eyre",
5500-
"colored",
5501-
"comma",
5502-
"crossbeam-channel",
5503-
"indicatif",
5504-
"lazy_static",
5505-
"levenshtein",
5506-
"prettydiff",
5507-
"regex",
5508-
"rustc_version",
5509-
"rustfix",
5510-
"serde",
5511-
"serde_json",
5512-
"spanned",
5513-
]
5514-
55155488
[[package]]
55165489
name = "ui_test"
55175490
version = "0.26.5"

src/tools/clippy/.github/deploy.sh

+3-6
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,15 @@ if [[ $BETA = "true" ]]; then
2525
fi
2626

2727
# Generate version index that is shown as root index page
28-
cp util/gh-pages/versions.html out/index.html
29-
30-
echo "Making the versions.json file"
31-
python3 ./util/versions.py out
28+
python3 ./util/versions.py ./util/gh-pages/versions.html out
3229

3330
# Now let's go have some fun with the cloned repo
3431
cd out
3532
git config user.name "GHA CI"
3633
git config user.email "[email protected]"
3734

35+
git status
36+
3837
if [[ -n $TAG_NAME ]]; then
3938
# track files, so that the following check works
4039
git add --intent-to-add "$TAG_NAME"
@@ -46,8 +45,6 @@ if [[ -n $TAG_NAME ]]; then
4645
git add "$TAG_NAME"
4746
# Update the symlink
4847
git add stable
49-
# Update versions file
50-
git add versions.json
5148
git commit -m "Add documentation for ${TAG_NAME} release: ${SHA}"
5249
elif [[ $BETA = "true" ]]; then
5350
if git diff --exit-code --quiet -- beta/; then

src/tools/clippy/.github/workflows/clippy_bors.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ jobs:
162162
find $DIR ! -executable -o -type d ! -path $DIR | xargs rm -rf
163163
164164
- name: Upload Binaries
165-
uses: actions/upload-artifact@v3
165+
uses: actions/upload-artifact@v4
166166
with:
167167
name: binaries
168168
path: target/debug
@@ -202,7 +202,7 @@ jobs:
202202

203203
# Download
204204
- name: Download target dir
205-
uses: actions/download-artifact@v3
205+
uses: actions/download-artifact@v4
206206
with:
207207
name: binaries
208208
path: target/debug

src/tools/clippy/CHANGELOG.md

+64-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,61 @@ document.
66

77
## Unreleased / Beta / In Rust Nightly
88

9-
[c9139bd5...master](https://github.com/rust-lang/rust-clippy/compare/c9139bd5...master)
9+
[b794b8e0...master](https://github.com/rust-lang/rust-clippy/compare/b794b8e0...master)
10+
11+
## Rust 1.81
12+
13+
Current stable, released 2024-09-05
14+
15+
### New Lints
16+
17+
* Added [`cfg_not_test`] to `restriction`
18+
[#11293](https://github.com/rust-lang/rust-clippy/pull/11293)
19+
* Added [`byte_char_slices`] to `style`
20+
[#10155](https://github.com/rust-lang/rust-clippy/pull/10155)
21+
* Added [`set_contains_or_insert`] to `nursery`
22+
[#12873](https://github.com/rust-lang/rust-clippy/pull/12873)
23+
* Added [`manual_rotate`] to `style`
24+
[#12983](https://github.com/rust-lang/rust-clippy/pull/12983)
25+
* Added [`unnecessary_min_or_max`] to `complexity`
26+
[#12368](https://github.com/rust-lang/rust-clippy/pull/12368)
27+
* Added [`manual_inspect`] to `complexity`
28+
[#12287](https://github.com/rust-lang/rust-clippy/pull/12287)
29+
* Added [`field_scoped_visibility_modifiers`] to `restriction`
30+
[#12893](https://github.com/rust-lang/rust-clippy/pull/12893)
31+
* Added [`manual_pattern_char_comparison`] to `style`
32+
[#12849](https://github.com/rust-lang/rust-clippy/pull/12849)
33+
* Added [`needless_maybe_sized`] to `suspicious`
34+
[#10632](https://github.com/rust-lang/rust-clippy/pull/10632)
35+
* Added [`needless_character_iteration`] to `suspicious`
36+
[#12815](https://github.com/rust-lang/rust-clippy/pull/12815)
37+
38+
### Moves and Deprecations
39+
40+
* [`allow_attributes`], [`allow_attributes_without_reason`]: Now work on stable
41+
[rust#120924](https://github.com/rust-lang/rust/pull/120924)
42+
* Renamed `overflow_check_conditional` to [`panicking_overflow_checks`]
43+
[#12944](https://github.com/rust-lang/rust-clippy/pull/12944)
44+
* Moved [`panicking_overflow_checks`] to `correctness` (From `complexity` now deny-by-default)
45+
[#12944](https://github.com/rust-lang/rust-clippy/pull/12944)
46+
* Renamed `thread_local_initializer_can_be_made_const` to [`missing_const_for_thread_local`]
47+
[#12974](https://github.com/rust-lang/rust-clippy/pull/12974)
48+
* Deprecated [`maybe_misused_cfg`] and [`mismatched_target_os`] as they are now caught by cargo
49+
and rustc
50+
[#12875](https://github.com/rust-lang/rust-clippy/pull/12875)
51+
52+
### Enhancements
53+
54+
* [`significant_drop_in_scrutinee`]: Now also checks scrutinies of `while let` and `for let`
55+
expressions
56+
[#12870](https://github.com/rust-lang/rust-clippy/pull/12870)
57+
* [`std_instead_of_core`]: Now respects the `msrv` configuration
58+
[#13168](https://github.com/rust-lang/rust-clippy/pull/13168)
59+
60+
### ICE Fixes
61+
62+
* [`suboptimal_flops`]: No longer crashes on custom `.log()` functions
63+
[#12884](https://github.com/rust-lang/rust-clippy/pull/12884)
1064

1165
## Rust 1.80
1266

@@ -5500,6 +5554,7 @@ Released 2018-09-13
55005554
[`invalid_regex`]: https://rust-lang.github.io/rust-clippy/master/index.html#invalid_regex
55015555
[`invalid_upcast_comparisons`]: https://rust-lang.github.io/rust-clippy/master/index.html#invalid_upcast_comparisons
55025556
[`invalid_utf8_in_unchecked`]: https://rust-lang.github.io/rust-clippy/master/index.html#invalid_utf8_in_unchecked
5557+
[`inverted_saturating_sub`]: https://rust-lang.github.io/rust-clippy/master/index.html#inverted_saturating_sub
55035558
[`invisible_characters`]: https://rust-lang.github.io/rust-clippy/master/index.html#invisible_characters
55045559
[`is_digit_ascii_radix`]: https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix
55055560
[`items_after_statements`]: https://rust-lang.github.io/rust-clippy/master/index.html#items_after_statements
@@ -5559,6 +5614,7 @@ Released 2018-09-13
55595614
[`manual_bits`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_bits
55605615
[`manual_c_str_literals`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals
55615616
[`manual_clamp`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp
5617+
[`manual_div_ceil`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil
55625618
[`manual_filter`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_filter
55635619
[`manual_filter_map`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_filter_map
55645620
[`manual_find`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_find
@@ -5570,6 +5626,7 @@ Released 2018-09-13
55705626
[`manual_is_ascii_check`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_ascii_check
55715627
[`manual_is_finite`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_finite
55725628
[`manual_is_infinite`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_infinite
5629+
[`manual_is_power_of_two`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_power_of_two
55735630
[`manual_is_variant_and`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_variant_and
55745631
[`manual_let_else`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else
55755632
[`manual_main_separator_str`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_main_separator_str
@@ -5716,6 +5773,7 @@ Released 2018-09-13
57165773
[`non_minimal_cfg`]: https://rust-lang.github.io/rust-clippy/master/index.html#non_minimal_cfg
57175774
[`non_octal_unix_permissions`]: https://rust-lang.github.io/rust-clippy/master/index.html#non_octal_unix_permissions
57185775
[`non_send_fields_in_send_ty`]: https://rust-lang.github.io/rust-clippy/master/index.html#non_send_fields_in_send_ty
5776+
[`non_zero_suggestions`]: https://rust-lang.github.io/rust-clippy/master/index.html#non_zero_suggestions
57195777
[`nonminimal_bool`]: https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool
57205778
[`nonsensical_open_options`]: https://rust-lang.github.io/rust-clippy/master/index.html#nonsensical_open_options
57215779
[`nonstandard_macro_braces`]: https://rust-lang.github.io/rust-clippy/master/index.html#nonstandard_macro_braces
@@ -5757,6 +5815,7 @@ Released 2018-09-13
57575815
[`pathbuf_init_then_push`]: https://rust-lang.github.io/rust-clippy/master/index.html#pathbuf_init_then_push
57585816
[`pattern_type_mismatch`]: https://rust-lang.github.io/rust-clippy/master/index.html#pattern_type_mismatch
57595817
[`permissions_set_readonly_false`]: https://rust-lang.github.io/rust-clippy/master/index.html#permissions_set_readonly_false
5818+
[`pointers_in_nomem_asm_block`]: https://rust-lang.github.io/rust-clippy/master/index.html#pointers_in_nomem_asm_block
57605819
[`positional_named_format_parameters`]: https://rust-lang.github.io/rust-clippy/master/index.html#positional_named_format_parameters
57615820
[`possible_missing_comma`]: https://rust-lang.github.io/rust-clippy/master/index.html#possible_missing_comma
57625821
[`precedence`]: https://rust-lang.github.io/rust-clippy/master/index.html#precedence
@@ -5962,6 +6021,7 @@ Released 2018-09-13
59626021
[`unnecessary_fallible_conversions`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions
59636022
[`unnecessary_filter_map`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_filter_map
59646023
[`unnecessary_find_map`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_find_map
6024+
[`unnecessary_first_then_check`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_first_then_check
59656025
[`unnecessary_fold`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold
59666026
[`unnecessary_get_then_check`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check
59676027
[`unnecessary_join`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_join
@@ -6003,6 +6063,7 @@ Released 2018-09-13
60036063
[`unused_result_ok`]: https://rust-lang.github.io/rust-clippy/master/index.html#unused_result_ok
60046064
[`unused_rounding`]: https://rust-lang.github.io/rust-clippy/master/index.html#unused_rounding
60056065
[`unused_self`]: https://rust-lang.github.io/rust-clippy/master/index.html#unused_self
6066+
[`unused_trait_names`]: https://rust-lang.github.io/rust-clippy/master/index.html#unused_trait_names
60066067
[`unused_unit`]: https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit
60076068
[`unusual_byte_groupings`]: https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings
60086069
[`unwrap_in_result`]: https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_in_result
@@ -6013,6 +6074,7 @@ Released 2018-09-13
60136074
[`use_debug`]: https://rust-lang.github.io/rust-clippy/master/index.html#use_debug
60146075
[`use_self`]: https://rust-lang.github.io/rust-clippy/master/index.html#use_self
60156076
[`used_underscore_binding`]: https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_binding
6077+
[`used_underscore_items`]: https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_items
60166078
[`useless_asref`]: https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref
60176079
[`useless_attribute`]: https://rust-lang.github.io/rust-clippy/master/index.html#useless_attribute
60186080
[`useless_conversion`]: https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
@@ -6047,6 +6109,7 @@ Released 2018-09-13
60476109
[`zero_repeat_side_effects`]: https://rust-lang.github.io/rust-clippy/master/index.html#zero_repeat_side_effects
60486110
[`zero_sized_map_values`]: https://rust-lang.github.io/rust-clippy/master/index.html#zero_sized_map_values
60496111
[`zero_width_space`]: https://rust-lang.github.io/rust-clippy/master/index.html#zero_width_space
6112+
[`zombie_processes`]: https://rust-lang.github.io/rust-clippy/master/index.html#zombie_processes
60506113
[`zst_offset`]: https://rust-lang.github.io/rust-clippy/master/index.html#zst_offset
60516114
<!-- end autogenerated links to lint list -->
60526115
<!-- begin autogenerated links to configuration documentation -->

src/tools/clippy/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "clippy"
3-
version = "0.1.82"
3+
version = "0.1.83"
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"
@@ -31,7 +31,7 @@ anstream = "0.6.0"
3131

3232
[dev-dependencies]
3333
cargo_metadata = "0.18.1"
34-
ui_test = "0.25"
34+
ui_test = "0.26.4"
3535
regex = "1.5.5"
3636
serde = { version = "1.0.145", features = ["derive"] }
3737
serde_json = "1.0.122"

src/tools/clippy/book/src/lint_configuration.md

+1
Original file line numberDiff line numberDiff line change
@@ -727,6 +727,7 @@ The minimum rust version that the project supports. Defaults to the `rust-versio
727727
* [`uninlined_format_args`](https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args)
728728
* [`unnecessary_lazy_evaluations`](https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations)
729729
* [`unnested_or_patterns`](https://rust-lang.github.io/rust-clippy/master/index.html#unnested_or_patterns)
730+
* [`unused_trait_names`](https://rust-lang.github.io/rust-clippy/master/index.html#unused_trait_names)
730731
* [`use_self`](https://rust-lang.github.io/rust-clippy/master/index.html#use_self)
731732

732733

src/tools/clippy/clippy_config/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "clippy_config"
3-
version = "0.1.82"
3+
version = "0.1.83"
44
edition = "2021"
55

66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

src/tools/clippy/clippy_config/src/conf.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
use crate::ClippyConfiguration;
12
use crate::msrvs::Msrv;
23
use crate::types::{DisallowedPath, MacroMatcher, MatchLintBehaviour, PubUnderscoreFieldsBehaviour, Rename};
3-
use crate::ClippyConfiguration;
44
use rustc_errors::Applicability;
55
use rustc_session::Session;
66
use rustc_span::edit_distance::edit_distance;
@@ -563,6 +563,7 @@ define_Conf! {
563563
uninlined_format_args,
564564
unnecessary_lazy_evaluations,
565565
unnested_or_patterns,
566+
unused_trait_names,
566567
use_self,
567568
)]
568569
msrv: Msrv = Msrv::empty(),
@@ -864,7 +865,7 @@ fn calculate_dimensions(fields: &[&str]) -> (usize, Vec<usize>) {
864865
cmp::max(1, terminal_width / (SEPARATOR_WIDTH + max_field_width))
865866
});
866867

867-
let rows = (fields.len() + (columns - 1)) / columns;
868+
let rows = fields.len().div_ceil(columns);
868869

869870
let column_widths = (0..columns)
870871
.map(|column| {

src/tools/clippy/clippy_config/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ mod metadata;
2626
pub mod msrvs;
2727
pub mod types;
2828

29-
pub use conf::{get_configuration_metadata, lookup_conf_file, Conf};
29+
pub use conf::{Conf, get_configuration_metadata, lookup_conf_file};
3030
pub use metadata::ClippyConfiguration;

src/tools/clippy/clippy_config/src/msrvs.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use rustc_ast::Attribute;
22
use rustc_attr::parse_version;
33
use rustc_session::{RustcVersion, Session};
4-
use rustc_span::{sym, Symbol};
4+
use rustc_span::{Symbol, sym};
55
use serde::Deserialize;
66
use std::fmt;
77

@@ -23,6 +23,7 @@ msrv_aliases! {
2323
1,80,0 { BOX_INTO_ITER}
2424
1,77,0 { C_STR_LITERALS }
2525
1,76,0 { PTR_FROM_REF, OPTION_RESULT_INSPECT }
26+
1,73,0 { MANUAL_DIV_CEIL }
2627
1,71,0 { TUPLE_ARRAY_CONVERSIONS, BUILD_HASHER_HASH_ONE }
2728
1,70,0 { OPTION_RESULT_IS_VARIANT_AND, BINARY_HEAP_RETAIN }
2829
1,68,0 { PATH_MAIN_SEPARATOR_STR }
@@ -38,7 +39,7 @@ msrv_aliases! {
3839
1,52,0 { STR_SPLIT_ONCE, REM_EUCLID_CONST }
3940
1,51,0 { BORROW_AS_PTR, SEEK_FROM_CURRENT, UNSIGNED_ABS }
4041
1,50,0 { BOOL_THEN, CLAMP }
41-
1,47,0 { TAU, IS_ASCII_DIGIT_CONST, ARRAY_IMPL_ANY_LEN }
42+
1,47,0 { TAU, IS_ASCII_DIGIT_CONST, ARRAY_IMPL_ANY_LEN, SATURATING_SUB_CONST }
4243
1,46,0 { CONST_IF_MATCH }
4344
1,45,0 { STR_STRIP_PREFIX }
4445
1,43,0 { LOG2_10, LOG10_2, NUMERIC_ASSOCIATED_CONSTANTS }
@@ -50,6 +51,7 @@ msrv_aliases! {
5051
1,36,0 { ITERATOR_COPIED }
5152
1,35,0 { OPTION_COPIED, RANGE_CONTAINS }
5253
1,34,0 { TRY_FROM }
54+
1,33,0 { UNDERSCORE_IMPORTS }
5355
1,30,0 { ITERATOR_FIND_MAP, TOOL_ATTRIBUTES }
5456
1,29,0 { ITER_FLATTEN }
5557
1,28,0 { FROM_BOOL }

src/tools/clippy/clippy_config/src/types.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use serde::de::{self, Deserializer, Visitor};
2-
use serde::{ser, Deserialize, Serialize};
2+
use serde::{Deserialize, Serialize, ser};
33
use std::fmt;
44

55
#[derive(Debug, Deserialize)]

src/tools/clippy/clippy_dev/src/fmt.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use crate::clippy_project_root;
22
use itertools::Itertools;
3-
use rustc_lexer::{tokenize, TokenKind};
3+
use rustc_lexer::{TokenKind, tokenize};
44
use shell_escape::escape;
55
use std::ffi::{OsStr, OsString};
66
use std::ops::ControlFlow;

src/tools/clippy/clippy_dev/src/new_lint.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ fn create_lint_for_ty(lint: &LintData<'_>, enable_msrv: bool, ty: &str) -> io::R
441441

442442
#[allow(clippy::too_many_lines)]
443443
fn setup_mod_file(path: &Path, lint: &LintData<'_>) -> io::Result<&'static str> {
444-
use super::update_lints::{match_tokens, LintDeclSearchResult};
444+
use super::update_lints::{LintDeclSearchResult, match_tokens};
445445
use rustc_lexer::TokenKind;
446446

447447
let lint_name_upper = lint.name.to_uppercase();

0 commit comments

Comments
 (0)