Skip to content

Commit ae1c191

Browse files
committed
Merge commit '7901289135257ca0fbed3a5522526f95b0f5edba' into clippy-subtree-update
2 parents 4cadeda + 7901289 commit ae1c191

File tree

566 files changed

+7437
-2571
lines changed

Some content is hidden

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

566 files changed

+7437
-2571
lines changed

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

+9-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"
@@ -67,3 +67,10 @@ harness = false
6767
[[test]]
6868
name = "dogfood"
6969
harness = false
70+
71+
# quine-mc_cluskey makes up a significant part of the runtime in dogfood
72+
# due to the number of conditions in the clippy_lints crate
73+
# and enabling optimizations for that specific dependency helps a bit
74+
# without increasing total build times.
75+
[profile.dev.package.quine-mc_cluskey]
76+
opt-level = 3

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();

src/tools/clippy/clippy_dev/src/serve.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ pub fn run(port: u16, lint: Option<String>) -> ! {
2929
}
3030
if let Some(url) = url.take() {
3131
thread::spawn(move || {
32-
Command::new(PYTHON)
32+
let mut child = Command::new(PYTHON)
3333
.arg("-m")
3434
.arg("http.server")
3535
.arg(port.to_string())
@@ -40,6 +40,7 @@ pub fn run(port: u16, lint: Option<String>) -> ! {
4040
thread::sleep(Duration::from_millis(500));
4141
// Launch browser after first export.py has completed and http.server is up
4242
let _result = opener::open(url);
43+
child.wait().unwrap();
4344
});
4445
}
4546
thread::sleep(Duration::from_millis(1000));

src/tools/clippy/clippy_dev/src/update_lints.rs

+12-18
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use crate::clippy_project_root;
22
use aho_corasick::AhoCorasickBuilder;
33
use itertools::Itertools;
4-
use rustc_lexer::{tokenize, unescape, LiteralKind, TokenKind};
4+
use rustc_lexer::{LiteralKind, TokenKind, tokenize, unescape};
55
use std::collections::{HashMap, HashSet};
66
use std::ffi::OsStr;
77
use std::fmt::{self, Write};
@@ -1048,23 +1048,17 @@ mod tests {
10481048
Lint::new("incorrect_match", "group1", "\"abc\"", "module_name", Range::default()),
10491049
];
10501050
let mut expected: HashMap<String, Vec<Lint>> = HashMap::new();
1051-
expected.insert(
1052-
"group1".to_string(),
1053-
vec![
1054-
Lint::new("should_assert_eq", "group1", "\"abc\"", "module_name", Range::default()),
1055-
Lint::new("incorrect_match", "group1", "\"abc\"", "module_name", Range::default()),
1056-
],
1057-
);
1058-
expected.insert(
1059-
"group2".to_string(),
1060-
vec![Lint::new(
1061-
"should_assert_eq2",
1062-
"group2",
1063-
"\"abc\"",
1064-
"module_name",
1065-
Range::default(),
1066-
)],
1067-
);
1051+
expected.insert("group1".to_string(), vec![
1052+
Lint::new("should_assert_eq", "group1", "\"abc\"", "module_name", Range::default()),
1053+
Lint::new("incorrect_match", "group1", "\"abc\"", "module_name", Range::default()),
1054+
]);
1055+
expected.insert("group2".to_string(), vec![Lint::new(
1056+
"should_assert_eq2",
1057+
"group2",
1058+
"\"abc\"",
1059+
"module_name",
1060+
Range::default(),
1061+
)]);
10681062
assert_eq!(expected, Lint::by_lint_group(lints.into_iter()));
10691063
}
10701064
}

src/tools/clippy/clippy_lints/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "clippy_lints"
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"

src/tools/clippy/clippy_lints/src/absolute_paths.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ use clippy_utils::diagnostics::span_lint;
33
use clippy_utils::is_from_proc_macro;
44
use rustc_data_structures::fx::FxHashSet;
55
use rustc_hir::def::{DefKind, Res};
6-
use rustc_hir::def_id::{DefId, CRATE_DEF_INDEX};
6+
use rustc_hir::def_id::{CRATE_DEF_INDEX, DefId};
77
use rustc_hir::{HirId, ItemKind, Node, Path};
88
use rustc_lint::{LateContext, LateLintPass};
99
use rustc_session::impl_lint_pass;
10-
use rustc_span::symbol::kw;
1110
use rustc_span::Symbol;
11+
use rustc_span::symbol::kw;
1212

1313
declare_clippy_lint! {
1414
/// ### What it does

0 commit comments

Comments
 (0)