Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d464b72

Browse files
committedOct 5, 2023
Add more diagnostic items for clippy
1 parent cae0791 commit d464b72

Some content is hidden

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

75 files changed

+290
-271
lines changed
 

‎compiler/rustc_span/src/symbol.rs

+49
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,11 @@ symbols! {
129129
Alignment,
130130
Any,
131131
Arc,
132+
ArcWeak,
132133
Argument,
133134
ArgumentMethods,
134135
Arguments,
136+
ArrayIntoIter,
135137
AsMut,
136138
AsRef,
137139
AssertParamIsClone,
@@ -164,13 +166,15 @@ symbols! {
164166
Capture,
165167
Center,
166168
Clone,
169+
Command,
167170
ConstParamTy,
168171
Context,
169172
Continue,
170173
Copy,
171174
Count,
172175
Cow,
173176
Debug,
177+
DebugStruct,
174178
Decodable,
175179
Decoder,
176180
DecorateLint,
@@ -194,6 +198,8 @@ symbols! {
194198
From,
195199
FromIterator,
196200
FromResidual,
201+
FsOpenOptions,
202+
FsPermissions,
197203
Future,
198204
FutureOutput,
199205
FxHashMap,
@@ -207,16 +213,22 @@ symbols! {
207213
Implied,
208214
IndexOutput,
209215
Input,
216+
Instant,
210217
Into,
211218
IntoDiagnostic,
212219
IntoFuture,
213220
IntoIterator,
221+
IoLines,
214222
IoRead,
223+
IoSeek,
215224
IoWrite,
216225
IpAddr,
217226
IrTyKind,
218227
Is,
219228
ItemContext,
229+
IterEmpty,
230+
IterOnce,
231+
IterPeekable,
220232
Iterator,
221233
IteratorItem,
222234
Layout,
@@ -227,6 +239,7 @@ symbols! {
227239
Mutex,
228240
MutexGuard,
229241
N,
242+
NonNull,
230243
NonZeroI128,
231244
NonZeroI16,
232245
NonZeroI32,
@@ -259,15 +272,19 @@ symbols! {
259272
ProcMacro,
260273
ProceduralMasqueradeDummyType,
261274
Range,
275+
RangeBounds,
262276
RangeFrom,
263277
RangeFull,
264278
RangeInclusive,
265279
RangeTo,
266280
RangeToInclusive,
267281
Rc,
282+
RcWeak,
268283
Ready,
269284
Receiver,
270285
RefCell,
286+
RefCellRef,
287+
RefCellRefMut,
271288
Relaxed,
272289
Release,
273290
Result,
@@ -284,6 +301,7 @@ symbols! {
284301
Send,
285302
SeqCst,
286303
SliceIndex,
304+
SliceIter,
287305
Some,
288306
String,
289307
StructuralEq,
@@ -561,6 +579,7 @@ symbols! {
561579
constant,
562580
constructor,
563581
context,
582+
convert_identity,
564583
copy,
565584
copy_closures,
566585
copy_nonoverlapping,
@@ -616,6 +635,7 @@ symbols! {
616635
declare_lint_pass,
617636
decode,
618637
default_alloc_error_handler,
638+
default_fn,
619639
default_lib_allocator,
620640
default_method_body_is_const,
621641
default_type_parameter_fallback,
@@ -628,6 +648,7 @@ symbols! {
628648
deref,
629649
deref_method,
630650
deref_mut,
651+
deref_mut_method,
631652
deref_target,
632653
derive,
633654
derive_const,
@@ -777,11 +798,14 @@ symbols! {
777798
from_desugaring,
778799
from_fn,
779800
from_iter,
801+
from_iter_fn,
780802
from_output,
781803
from_residual,
782804
from_size_align_unchecked,
805+
from_str_method,
783806
from_usize,
784807
from_yeet,
808+
fs_create_dir,
785809
fsub_fast,
786810
fundamental,
787811
future,
@@ -868,6 +892,10 @@ symbols! {
868892
into_iter,
869893
intra_doc_pointers,
870894
intrinsics,
895+
intrinsics_unaligned_volatile_load,
896+
intrinsics_unaligned_volatile_store,
897+
io_stderr,
898+
io_stdout,
871899
irrefutable_let_patterns,
872900
isa_attribute,
873901
isize,
@@ -962,6 +990,7 @@ symbols! {
962990
mem_replace,
963991
mem_size_of,
964992
mem_size_of_val,
993+
mem_swap,
965994
mem_uninitialized,
966995
mem_variant_count,
967996
mem_zeroed,
@@ -1091,6 +1120,7 @@ symbols! {
10911120
options,
10921121
or,
10931122
or_patterns,
1123+
ord_cmp_method,
10941124
other,
10951125
out,
10961126
overflow_checks,
@@ -1171,13 +1201,18 @@ symbols! {
11711201
proc_macro_mod,
11721202
proc_macro_non_items,
11731203
proc_macro_path_invoc,
1204+
process_exit,
11741205
profiler_builtins,
11751206
profiler_runtime,
11761207
ptr,
11771208
ptr_cast,
11781209
ptr_cast_const,
11791210
ptr_cast_mut,
11801211
ptr_const_is_null,
1212+
ptr_copy,
1213+
ptr_copy_nonoverlapping,
1214+
ptr_drop_in_place,
1215+
ptr_eq,
11811216
ptr_from_ref,
11821217
ptr_guaranteed_cmp,
11831218
ptr_is_null,
@@ -1186,8 +1221,17 @@ symbols! {
11861221
ptr_null_mut,
11871222
ptr_offset_from,
11881223
ptr_offset_from_unsigned,
1224+
ptr_read,
1225+
ptr_read_unaligned,
1226+
ptr_read_volatile,
1227+
ptr_replace,
1228+
ptr_slice_from_raw_parts,
1229+
ptr_slice_from_raw_parts_mut,
1230+
ptr_swap,
1231+
ptr_swap_nonoverlapping,
11891232
ptr_unique,
11901233
ptr_write,
1234+
ptr_write_bytes,
11911235
ptr_write_unaligned,
11921236
ptr_write_volatile,
11931237
pub_macro_rules,
@@ -1478,6 +1522,8 @@ symbols! {
14781522
sized,
14791523
skip,
14801524
slice,
1525+
slice_from_raw_parts,
1526+
slice_from_raw_parts_mut,
14811527
slice_len_fn,
14821528
slice_patterns,
14831529
slicing_syntax,
@@ -1565,7 +1611,9 @@ symbols! {
15651611
thumb2,
15661612
thumb_mode: "thumb-mode",
15671613
tmm_reg,
1614+
to_owned_method,
15681615
to_string,
1616+
to_string_method,
15691617
to_vec,
15701618
todo_macro,
15711619
tool_attributes,
@@ -1588,6 +1636,7 @@ symbols! {
15881636
try_blocks,
15891637
try_capture,
15901638
try_from,
1639+
try_from_fn,
15911640
try_into,
15921641
try_trait_v2,
15931642
tt,

‎library/alloc/src/borrow.rs

+1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ pub trait ToOwned {
5555
/// ```
5656
#[stable(feature = "rust1", since = "1.0.0")]
5757
#[must_use = "cloning is often expensive and is not expected to have side effects"]
58+
#[cfg_attr(not(test), rustc_diagnostic_item = "to_owned_method")]
5859
fn to_owned(&self) -> Self::Owned;
5960

6061
/// Uses borrowed data to replace owned data, usually by cloning.

0 commit comments

Comments
 (0)
Please sign in to comment.