1
Fork 0

Rollup merge of #130553 - GnomedDev:remove-clippy-paths, r=compiler-errors

[Clippy] Get rid of most `std` `match_def_path` usage, swap to diagnostic items.

Part of https://github.com/rust-lang/rust-clippy/issues/5393.

This was going to remove all `std` paths, but `SeekFrom` has issues being cleanly replaced with a diagnostic item as the paths are for variants, which currently cannot be diagnostic items.

This also, as a last step, categories the paths to help with future path removals.
This commit is contained in:
Matthias Krüger 2024-09-19 20:37:07 +02:00 committed by GitHub
commit 569153a432
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
42 changed files with 203 additions and 163 deletions

View file

@ -342,6 +342,7 @@ symbols! {
Upvars,
Vec,
VecDeque,
Waker,
Wrapper,
Wrapping,
Yield,
@ -501,6 +502,7 @@ symbols! {
black_box,
block,
bool,
bool_then,
borrowck_graphviz_format,
borrowck_graphviz_postflow,
box_new,
@ -512,6 +514,8 @@ symbols! {
breakpoint,
bridge,
bswap,
btreemap_contains_key,
btreemap_insert,
btreeset_iter,
builtin_syntax,
c,
@ -680,6 +684,7 @@ symbols! {
crt_dash_static: "crt-static",
csky_target_feature,
cstr_type,
cstring_as_c_str,
cstring_type,
ctlz,
ctlz_nonzero,
@ -835,6 +840,7 @@ symbols! {
f16_nan,
f16c_target_feature,
f32,
f32_epsilon,
f32_legacy_const_digits,
f32_legacy_const_epsilon,
f32_legacy_const_infinity,
@ -851,6 +857,7 @@ symbols! {
f32_legacy_const_radix,
f32_nan,
f64,
f64_epsilon,
f64_legacy_const_digits,
f64_legacy_const_epsilon,
f64_legacy_const_infinity,
@ -888,6 +895,7 @@ symbols! {
field,
field_init_shorthand,
file,
file_options,
float,
float_to_int_unchecked,
floorf128,
@ -973,7 +981,17 @@ symbols! {
half_open_range_patterns,
half_open_range_patterns_in_slices,
hash,
hashmap_contains_key,
hashmap_drain_ty,
hashmap_insert,
hashmap_iter_mut_ty,
hashmap_iter_ty,
hashmap_keys_ty,
hashmap_values_mut_ty,
hashmap_values_ty,
hashset_drain_ty,
hashset_iter,
hashset_iter_ty,
hexagon_target_feature,
hidden,
homogeneous_aggregate,
@ -1052,6 +1070,7 @@ symbols! {
inline_const,
inline_const_pat,
inout,
instant_now,
instruction_set,
integer_: "integer", // underscore to avoid clashing with the function `sym::integer` below
integral,
@ -1352,6 +1371,7 @@ symbols! {
on,
on_unimplemented,
opaque,
open_options_new,
ops,
opt_out_copy,
optimize,
@ -1359,10 +1379,14 @@ symbols! {
optin_builtin_traits,
option,
option_env,
option_expect,
option_unwrap,
options,
or,
or_patterns,
ord_cmp_method,
os_str_to_os_string,
os_string_as_os_str,
other,
out,
overflow_checks,
@ -1416,10 +1440,14 @@ symbols! {
pat_param,
patchable_function_entry,
path,
path_main_separator,
path_to_pathbuf,
pathbuf_as_path,
pattern_complexity,
pattern_parentheses,
pattern_type,
pattern_types,
permissions_from_mode,
phantom_data,
pic,
pie,
@ -1571,6 +1599,7 @@ symbols! {
residual,
result,
result_ffi_guarantees,
result_ok_method,
resume,
return_position_impl_trait_in_trait,
return_type_notation,
@ -1823,6 +1852,7 @@ symbols! {
slice,
slice_from_raw_parts,
slice_from_raw_parts_mut,
slice_into_vec,
slice_iter,
slice_len_fn,
slice_patterns,
@ -1857,16 +1887,25 @@ symbols! {
store,
str,
str_chars,
str_ends_with,
str_from_utf8,
str_from_utf8_mut,
str_from_utf8_unchecked,
str_from_utf8_unchecked_mut,
str_len,
str_split_whitespace,
str_starts_with,
str_trim,
str_trim_end,
str_trim_start,
strict_provenance,
string_as_mut_str,
string_as_str,
string_deref_patterns,
string_from_utf8,
string_insert_str,
string_new,
string_push_str,
stringify,
struct_field_attributes,
struct_inherit,
@ -2071,7 +2110,14 @@ symbols! {
var,
variant_count,
vec,
vec_as_mut_slice,
vec_as_slice,
vec_from_elem,
vec_is_empty,
vec_macro,
vec_new,
vec_pop,
vec_with_capacity,
vecdeque_iter,
version,
vfp2,