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