1#![expect(non_upper_case_globals)]
2
3#[doc(no_inline)]
4pub use rustc_span::sym::*;
5
6macro_rules! val {
7 ($name:ident) => {
8 stringify!($name)
9 };
10 ($name:ident $value:literal) => {
11 $value
12 };
13}
14
15macro_rules! generate {
16 ($($name:ident $(: $value:literal)? ,)*) => {
17 pub const EXTRA_SYMBOLS: &[&str] = &[
19 $(
20 val!($name $($value)?),
21 )*
22 ];
23
24 mod clippy_symbols {
25 use rustc_span::{Symbol, symbol::PREDEFINED_SYMBOLS_COUNT};
26 $(
27 pub const $name: Symbol = Symbol::new(PREDEFINED_SYMBOLS_COUNT + ${index()});
28 )*
29 }
30
31 $(
32 pub use clippy_symbols::$name;
33 )*
34
35 #[allow(unused_imports)]
36 const _: () = {
40 use rustc_span::sym::*; use clippy_symbols::*; use { $($name),* }; };
44 };
45}
46
47generate! {
52 Any,
53 Applicability,
54 ArrayIntoIter,
55 AsyncReadExt,
56 AsyncWriteExt,
57 BACKSLASH_SINGLE_QUOTE: r"\'",
58 BITS,
59 BTreeEntry,
60 BTreeSet,
61 Binary,
62 BinaryHeap,
63 CLIPPY_ARGS,
64 CLIPPY_CONF_DIR,
65 CRLF: "\r\n",
66 Cargo_toml: "Cargo.toml",
67 Child,
68 Command,
69 Current,
70 DOUBLE_QUOTE: "\"",
71 DebugStruct,
72 Deserialize,
73 DirBuilder,
74 DoubleEndedIterator,
75 Duration,
76 EarlyContext,
77 EarlyLintPass,
78 Enumerate,
79 Error,
80 File,
81 FileType,
82 FromStr,
83 FsOpenOptions,
84 FsPermissions,
85 HashMapEntry,
86 Instant,
87 IntoIter,
88 IoBufRead,
89 IoLines,
90 IoRead,
91 IoSeek,
92 IoWrite,
93 IpAddr,
94 Ipv4Addr,
95 Ipv6Addr,
96 IterEmpty,
97 IterOnce,
98 IterPeekable,
99 Itertools,
100 LF: "\n",
101 LateContext,
102 Lazy,
103 LinkedList,
104 Lint,
105 LowerExp,
106 LowerHex,
107 MAX,
108 MIN,
109 MaybeDef,
110 MpmcReceiver,
111 MpscReceiver,
112 MsrvStack,
113 Octal,
114 OpenOptions,
115 OsStr,
116 OsString,
117 Path,
118 PathBuf,
119 PathLookup,
120 PhantomPinned,
121 RangeBounds,
122 RefCellRef,
123 RefCellRefMut,
124 Regex,
125 RegexBuilder,
126 RegexSet,
127 Saturating,
128 SeekFrom,
129 SliceIter,
130 Start,
131 Stdin,
132 Symbol,
133 SyntaxContext,
134 TBD,
135 ToOwned,
136 ToString,
137 UpperExp,
138 UpperHex,
139 V4,
140 V6,
141 VecDeque,
142 Visitor,
143 Wake,
144 Waker,
145 Weak,
146 Wrapping,
147 abs,
148 allow_attributes,
149 ambiguous_glob_reexports,
150 app,
151 append,
152 applicability,
153 arg,
154 as_bytes,
155 as_deref,
156 as_deref_mut,
157 as_mut,
158 as_mut_ptr,
159 as_mut_slice,
160 as_path,
161 as_slice,
162 as_str,
163 assert_failed,
164 assert_matches,
165 author,
166 back,
167 binary_heap_pop_if,
168 binaryheap_iter,
169 bool_then,
170 borrow,
171 borrow_mut,
172 box_assume_init_into_vec_unsafe,
173 btreemap_contains_key,
174 btreemap_insert,
175 btreeset_iter,
176 build_hasher,
177 by_ref,
178 bytes,
179 capacity,
180 cargo_clippy: "cargo-clippy",
181 cast,
182 cast_const,
183 cast_mut,
184 ceil_char_boundary,
185 chain,
186 char_is_ascii,
187 char_to_digit,
188 chars,
189 check_attributes,
190 checked_abs,
191 checked_add,
192 checked_isqrt,
193 checked_mul,
194 checked_pow,
195 checked_rem_euclid,
196 checked_sub,
197 child_id,
198 child_kill,
199 chunks_exact,
200 chunks_exact_mut,
201 clamp,
202 clippy_utils,
203 clone_into,
204 cloned,
205 cmp_max,
206 cmp_min,
207 cognitive_complexity,
208 collapsible_else_if,
209 collapsible_if,
210 collect,
211 const_ptr,
212 contains,
213 convert_identity,
214 copied,
215 copy_from,
216 copy_from_nonoverlapping,
217 copy_to,
218 copy_to_nonoverlapping,
219 core_arch,
220 core_panic_2021_macro,
221 count_ones,
222 create,
223 create_new,
224 cstring_as_c_str,
225 cx,
226 cycle,
227 cyclomatic_complexity,
228 dbg_macro,
229 de,
230 debug_assert_matches,
231 debug_struct,
232 deprecated_in_future,
233 deref_mut_method,
234 diagnostics,
235 disallowed_types,
236 drain,
237 dump,
238 duration_constructors,
239 ends_with,
240 enum_glob_use,
241 enumerate,
242 enumerate_method,
243 eprint,
244 eprintln,
245 err,
246 expect_err,
247 expn_data,
248 exported_private_dependencies,
249 extend,
250 f128_consts_mod,
251 f128_epsilon,
252 f16_consts_mod,
253 f16_epsilon,
254 f32_consts_mod,
255 f32_epsilon,
256 f32_legacy_const_digits,
257 f32_legacy_const_epsilon,
258 f32_legacy_const_infinity,
259 f32_legacy_const_mantissa_dig,
260 f32_legacy_const_max,
261 f32_legacy_const_max_10_exp,
262 f32_legacy_const_max_exp,
263 f32_legacy_const_min,
264 f32_legacy_const_min_10_exp,
265 f32_legacy_const_min_exp,
266 f32_legacy_const_min_positive,
267 f32_legacy_const_nan,
268 f32_legacy_const_neg_infinity,
269 f32_legacy_const_radix,
270 f64_consts_mod,
271 f64_epsilon,
272 f64_legacy_const_digits,
273 f64_legacy_const_epsilon,
274 f64_legacy_const_infinity,
275 f64_legacy_const_mantissa_dig,
276 f64_legacy_const_max,
277 f64_legacy_const_max_10_exp,
278 f64_legacy_const_max_exp,
279 f64_legacy_const_min,
280 f64_legacy_const_min_10_exp,
281 f64_legacy_const_min_exp,
282 f64_legacy_const_min_positive,
283 f64_legacy_const_nan,
284 f64_legacy_const_neg_infinity,
285 f64_legacy_const_radix,
286 file_options,
287 filter,
288 filter_map,
289 find,
290 find_map,
291 finish,
292 finish_non_exhaustive,
293 first,
294 flat_map,
295 flatten,
296 floor_char_boundary,
297 fold,
298 for_each,
299 format,
300 from_be_bytes,
301 from_bytes_with_nul,
302 from_bytes_with_nul_unchecked,
303 from_days,
304 from_fn,
305 from_hours,
306 from_le_bytes,
307 from_micros,
308 from_millis,
309 from_mins,
310 from_nanos,
311 from_nanos_u128,
312 from_ne_bytes,
313 from_ptr,
314 from_raw,
315 from_raw_parts,
316 from_secs,
317 from_secs_f32,
318 from_secs_f64,
319 from_str_method,
320 from_str_radix,
321 from_weeks,
322 front,
323 fs,
324 fs_create_dir,
325 fuse,
326 futures_util,
327 get,
328 get_mut,
329 get_or_insert,
330 get_or_insert_with,
331 get_unchecked,
332 get_unchecked_mut,
333 has_significant_drop,
334 hashmap_contains_key,
335 hashmap_drain_ty,
336 hashmap_insert,
337 hashmap_iter_mut_ty,
338 hashmap_iter_ty,
339 hashmap_keys_ty,
340 hashmap_values_mut_ty,
341 hashmap_values_ty,
342 hashset_drain_ty,
343 hashset_iter,
344 hashset_iter_ty,
345 help,
346 hidden_glob_reexports,
347 hygiene,
348 i128_legacy_const_max,
349 i128_legacy_const_min,
350 i128_legacy_fn_max_value,
351 i128_legacy_fn_min_value,
352 i128_legacy_mod,
353 i16_legacy_const_max,
354 i16_legacy_const_min,
355 i16_legacy_fn_max_value,
356 i16_legacy_fn_min_value,
357 i16_legacy_mod,
358 i32_legacy_const_max,
359 i32_legacy_const_min,
360 i32_legacy_fn_max_value,
361 i32_legacy_fn_min_value,
362 i32_legacy_mod,
363 i64_legacy_const_max,
364 i64_legacy_const_min,
365 i64_legacy_fn_max_value,
366 i64_legacy_fn_min_value,
367 i64_legacy_mod,
368 i8_legacy_const_max,
369 i8_legacy_const_min,
370 i8_legacy_fn_max_value,
371 i8_legacy_fn_min_value,
372 i8_legacy_mod,
373 ilog,
374 include_bytes_macro,
375 include_str_macro,
376 insert,
377 insert_str,
378 inspect,
379 instant_now,
380 int_roundings,
381 into,
382 into_bytes,
383 into_ok,
384 into_owned,
385 into_raw,
386 intrinsics_unaligned_volatile_load,
387 intrinsics_unaligned_volatile_store,
388 io,
389 io_error_new,
390 io_errorkind,
391 io_stderr,
392 io_stdout,
393 is_ascii,
394 is_char_boundary,
395 is_diag_item,
396 is_diagnostic_item,
397 is_digit,
398 is_empty,
399 is_err,
400 is_file,
401 is_none,
402 is_none_or,
403 is_ok,
404 is_partitioned,
405 is_some,
406 is_some_and,
407 is_sorted_by_key,
408 isize_legacy_const_max,
409 isize_legacy_const_min,
410 isize_legacy_fn_max_value,
411 isize_legacy_fn_min_value,
412 isize_legacy_mod,
413 isqrt,
414 iter_cloned,
415 iter_copied,
416 iter_filter,
417 iter_repeat,
418 itertools,
419 join,
420 kw,
421 lazy_static,
422 leading_zeros,
423 lint_vec,
424 ln,
425 lock,
426 lock_api,
427 macro_concat,
428 macro_use_imports,
429 map_break,
430 map_continue,
431 map_or,
432 map_or_else,
433 map_while,
434 match_indices,
435 matches,
436 matches_macro,
437 max,
438 max_by,
439 max_by_key,
440 max_value,
441 may_panic,
442 mem_align_of,
443 mem_replace,
444 mem_size_of,
445 mem_size_of_val,
446 min,
447 min_by,
448 min_by_key,
449 min_value,
450 mode,
451 module_name_repetitions,
452 msrv,
453 msrvs,
454 mul_add,
455 mut_ptr,
456 mutex,
457 needless_return,
458 next_back,
459 next_if,
460 next_if_eq,
461 next_multiple_of,
462 next_tuple,
463 nth,
464 ok,
465 ok_or,
466 once_cell,
467 open,
468 open_options_new,
469 option_expect,
470 option_unwrap,
471 or_default,
472 or_else,
473 or_insert,
474 or_insert_with,
475 os_str_to_os_string,
476 os_string_as_os_str,
477 outer_expn,
478 panic_any,
479 parse,
480 partition,
481 path_main_separator,
482 path_to_pathbuf,
483 pathbuf_as_path,
484 paths,
485 peek,
486 peek_mut,
487 peekable,
488 permissions_from_mode,
489 pin_macro,
490 pop,
491 pop_back,
492 pop_back_if,
493 pop_front,
494 pop_front_if,
495 pop_if,
496 position,
497 pow,
498 print,
499 println,
500 process_abort,
501 process_exit,
502 product,
503 ptr_read_volatile,
504 ptr_slice_from_raw_parts,
505 ptr_slice_from_raw_parts_mut,
506 ptr_without_provenance,
507 ptr_without_provenance_mut,
508 push,
509 push_back,
510 push_front,
511 push_str,
512 range_step,
513 read,
514 read_exact,
515 read_line,
516 read_to_end,
517 read_to_string,
518 read_unaligned,
519 read_volatile,
520 reduce,
521 redundant_imports,
522 redundant_pub_crate,
523 regex,
524 rem_euclid,
525 repeat,
526 replace,
527 replacen,
528 res,
529 reserve,
530 resize,
531 restriction,
532 result_ok_method,
533 rev,
534 rfind,
535 rmatch_indices,
536 rmatches,
537 rposition,
538 rsplit,
539 rsplit_once,
540 rsplit_terminator,
541 rsplitn,
542 rsplitn_mut,
543 rustc_errors,
544 rustc_lint,
545 rustc_middle,
546 rustc_span,
547 rustfmt_skip,
548 rwlock,
549 saturating_abs,
550 saturating_div,
551 saturating_pow,
552 scan,
553 seek,
554 serde,
555 set_len,
556 set_mode,
557 set_readonly,
558 signum,
559 single_component_path_imports,
560 skip,
561 skip_while,
562 slice_from_ref,
563 slice_iter,
564 slice_mut_unchecked,
565 slice_unchecked,
566 sort,
567 sort_by,
568 sort_unstable_by,
569 span_help,
570 span_lint_and_then,
571 span_note,
572 span_suggestion,
573 split,
574 split_at,
575 split_at_checked,
576 split_at_mut,
577 split_at_mut_checked,
578 split_inclusive,
579 split_once,
580 split_terminator,
581 split_whitespace,
582 splitn,
583 splitn_mut,
584 starts_with,
585 std_detect,
586 step_by,
587 str_chars,
588 str_ends_with,
589 str_len,
590 str_split_whitespace,
591 str_starts_with,
592 str_trim,
593 str_trim_end,
594 str_trim_start,
595 string_as_mut_str,
596 string_as_str,
597 string_from_utf8,
598 string_insert_str,
599 string_new,
600 string_push_str,
601 strlen,
602 style,
603 subsec_micros,
604 subsec_nanos,
605 sum,
606 symbol,
607 take,
608 take_while,
609 tcx,
610 then,
611 then_some,
612 thread_local_macro,
613 to_ascii_lowercase,
614 to_ascii_uppercase,
615 to_be_bytes,
616 to_digit,
617 to_le_bytes,
618 to_lowercase,
619 to_ne_bytes,
620 to_os_string,
621 to_owned,
622 to_path_buf,
623 to_string_method,
624 to_uppercase,
625 tokio,
626 trim,
627 trim_end,
628 trim_end_matches,
629 trim_start,
630 trim_start_matches,
631 truncate,
632 try_fold,
633 try_for_each,
634 try_from_fn,
635 unreachable_pub,
636 unsafe_removed_from_name,
637 unused,
638 unused_braces,
639 unused_extern_crates,
640 unused_import_braces,
641 unused_trait_names,
642 unwrap_err,
643 unwrap_err_unchecked,
644 unwrap_or_default,
645 unwrap_or_else,
646 unwrap_unchecked,
647 unzip,
648 utils,
649 vec_as_mut_slice,
650 vec_as_slice,
651 vec_from_elem,
652 vec_is_empty,
653 vec_macro,
654 vec_new,
655 vec_pop,
656 vec_with_capacity,
657 vecdeque_iter,
658 visit_str,
659 visit_string,
660 wake,
661 wildcard_imports,
662 with_capacity,
663 wrapping_neg,
664 wrapping_offset,
665 write,
666 write_unaligned,
667 write_volatile,
668 writeln,
669 zip,
670}