rustc_span/
symbol.rs

1//! An "interner" is a data structure that associates values with usize tags and
2//! allows bidirectional lookup; i.e., given a value, one can easily find the
3//! type, and vice versa.
4
5use std::hash::{Hash, Hasher};
6use std::ops::Deref;
7use std::{fmt, str};
8
9use rustc_arena::DroplessArena;
10use rustc_data_structures::fx::{FxHashSet, FxIndexSet};
11use rustc_data_structures::stable_hasher::{
12    HashStable, StableCompare, StableHasher, ToStableHashKey,
13};
14use rustc_data_structures::sync::Lock;
15use rustc_macros::{Decodable, Encodable, HashStable_Generic, symbols};
16
17use crate::edit_distance::find_best_match_for_name;
18use crate::{DUMMY_SP, Edition, Span, with_session_globals};
19
20#[cfg(test)]
21mod tests;
22
23// The proc macro code for this is in `compiler/rustc_macros/src/symbols.rs`.
24impl Interner {
    #[doc =
    r" Creates an `Interner` with the predefined symbols from the `symbols!` macro and"]
    #[doc = r" any extra symbols provided by external drivers such as Clippy"]
    pub(crate) fn with_extra_symbols(extra_symbols: &[&'static str]) -> Self {
        Interner::prefill(&["$crate", "{{root}}", "_", "as", "break", "const",
                        "continue", "crate", "else", "enum", "extern", "false",
                        "fn", "for", "if", "impl", "in", "let", "loop", "match",
                        "mod", "move", "mut", "pub", "ref", "return", "self",
                        "Self", "static", "struct", "super", "trait", "true",
                        "type", "unsafe", "use", "where", "while", "abstract",
                        "become", "box", "do", "final", "macro", "override", "priv",
                        "typeof", "unsized", "virtual", "yield", "async", "await",
                        "dyn", "gen", "try", "'static", "'_", "auto", "builtin",
                        "catch", "contract_ensures", "contract_requires", "default",
                        "macro_rules", "raw", "reuse", "safe", "union", "yeet",
                        "Abi", "AcqRel", "Acquire", "Any", "Arc", "ArcWeak",
                        "Argument", "Array", "ArrayIntoIter", "AsMut", "AsRef",
                        "AssertParamIsClone", "AssertParamIsCopy",
                        "AssertParamIsEq", "AsyncGenFinished", "AsyncGenPending",
                        "AsyncGenReady", "AtomicBool", "AtomicI8", "AtomicI16",
                        "AtomicI32", "AtomicI64", "AtomicI128", "AtomicIsize",
                        "AtomicPtr", "AtomicU8", "AtomicU16", "AtomicU32",
                        "AtomicU64", "AtomicU128", "AtomicUsize", "BTreeEntry",
                        "BTreeMap", "BTreeSet", "BinaryHeap", "Bool", "Borrow",
                        "BorrowMut", "Break", "BuildHasher", "C", "CStr",
                        "C-unwind", "CallOnceFuture", "CallRefFuture", "Capture",
                        "Cell", "Center", "Char", "Child", "Cleanup", "Clone",
                        "CoercePointee", "CoercePointeeValidated", "CoerceUnsized",
                        "Command", "ConstParamTy", "ConstParamTy_", "Context",
                        "Continue", "ControlFlow", "Copy", "Cow", "Debug",
                        "DebugStruct", "Decodable", "Decoder", "Default", "Deref",
                        "DiagMessage", "Diagnostic", "DirBuilder",
                        "DispatchFromDyn", "Display", "DoubleEndedIterator",
                        "Duration", "Encodable", "Encoder", "Enumerate", "Eq",
                        "Equal", "Err", "Error", "File", "FileType", "Float",
                        "FmtArgumentsNew", "FmtWrite", "Fn", "FnMut", "FnOnce",
                        "Formatter", "Forward", "From", "FromIterator",
                        "FromResidual", "FsOpenOptions", "FsPermissions",
                        "FusedIterator", "Future", "GlobalAlloc", "Hash", "HashMap",
                        "HashMapEntry", "HashSet", "Hasher", "Implied", "InCleanup",
                        "IndexOutput", "Input", "Instant", "Int", "Into",
                        "IntoFuture", "IntoIterator", "IoBufRead", "IoLines",
                        "IoRead", "IoSeek", "IoWrite", "IpAddr", "Ipv4Addr",
                        "Ipv6Addr", "IrTyKind", "Is", "Item", "ItemContext",
                        "IterEmpty", "IterOnce", "IterPeekable", "Iterator",
                        "IteratorItem", "IteratorMap", "Layout", "Left",
                        "LinkedList", "LintDiagnostic", "LintPass", "LocalKey",
                        "Mutex", "MutexGuard", "N", "NonNull", "NonZero", "None",
                        "Normal", "Ok", "Option", "Ord", "Ordering", "OsStr",
                        "OsString", "Other", "Output", "Param", "ParamSet",
                        "PartialEq", "PartialOrd", "Path", "PathBuf", "Pending",
                        "PinCoerceUnsized", "PinDerefMutHelper", "Pointer", "Poll",
                        "ProcMacro", "ProceduralMasqueradeDummyType", "Range",
                        "RangeBounds", "RangeCopy", "RangeFrom", "RangeFromCopy",
                        "RangeFull", "RangeInclusive", "RangeInclusiveCopy",
                        "RangeMax", "RangeMin", "RangeSub", "RangeTo",
                        "RangeToInclusive", "RangeToInclusiveCopy", "Rc", "RcWeak",
                        "Ready", "Receiver", "RefCell", "RefCellRef",
                        "RefCellRefMut", "Reference", "Relaxed", "Release",
                        "Result", "ResumeTy", "Return", "Reverse", "Right", "Rust",
                        "RustaceansAreAwesome", "RwLock", "RwLockReadGuard",
                        "RwLockWriteGuard", "Saturating", "SeekFrom", "SelfTy",
                        "Send", "SeqCst", "Sized", "SliceIndex", "SliceIter",
                        "Some", "SpanCtxt", "Stdin", "Str", "String",
                        "StructuralPartialEq", "SubdiagMessage", "Subdiagnostic",
                        "SymbolIntern", "Sync", "SyncUnsafeCell", "T", "Target",
                        "This", "ToOwned", "ToString", "TokenStream", "Trait",
                        "TrivialClone", "Try", "TryCaptureGeneric",
                        "TryCapturePrintable", "TryFrom", "TryInto", "Tuple", "Ty",
                        "TyCtxt", "TyKind", "Unknown", "Unsize",
                        "UnsizedConstParamTy", "Upvars", "Vec", "VecDeque", "Waker",
                        "Wrapper", "Wrapping", "Yield", "_DECLS", "__D", "__H",
                        "__S", "__T", "__awaitee", "__try_var", "_t",
                        "_task_context", "a32", "aarch64", "aarch64_target_feature",
                        "aarch64_unstable_target_feature",
                        "aarch64_ver_target_feature", "abi", "abi_amdgpu_kernel",
                        "abi_avr_interrupt", "abi_c_cmse_nonsecure_call",
                        "abi_cmse_nonsecure_call", "abi_custom", "abi_efiapi",
                        "abi_gpu_kernel", "abi_msp430_interrupt", "abi_ptx",
                        "abi_riscv_interrupt", "abi_sysv64", "abi_thiscall",
                        "abi_unadjusted", "abi_vectorcall", "abi_x86_interrupt",
                        "abort", "add", "add_assign", "add_with_overflow",
                        "address", "adt_const_params", "advanced_slice_patterns",
                        "adx_target_feature", "aes", "aggregate_raw_ptr", "alias",
                        "align", "align_of", "align_of_val", "alignment", "all",
                        "alloc", "alloc_error_handler", "alloc_layout",
                        "alloc_zeroed", "allocator", "allocator_api",
                        "allocator_internals", "allow", "allow_fail",
                        "allow_internal_unsafe", "allow_internal_unstable",
                        "altivec", "alu32", "always", "amdgpu",
                        "amdgpu_dispatch_ptr", "analysis", "and", "and_then",
                        "anon", "anon_adt", "anon_assoc",
                        "anonymous_lifetime_in_impl_trait", "any",
                        "append_const_msg", "apx_target_feature",
                        "arbitrary_enum_discriminant", "arbitrary_self_types",
                        "arbitrary_self_types_pointers", "areg", "args",
                        "arith_offset", "arm", "arm64ec", "arm::a32", "arm::t32",
                        "arm_target_feature", "array", "as-needed", "as_ptr",
                        "as_ref", "as_str", "asm", "asm_cfg", "asm_const",
                        "asm_experimental_arch", "asm_experimental_reg", "asm_goto",
                        "asm_goto_with_outputs", "asm_sym", "asm_unwind", "assert",
                        "assert_eq", "assert_eq_macro", "assert_inhabited",
                        "assert_macro", "assert_mem_uninitialized_valid",
                        "assert_ne_macro", "assert_receiver_is_total_eq",
                        "assert_zero_valid", "asserting",
                        "associated_const_equality", "associated_consts",
                        "associated_type_bounds", "associated_type_defaults",
                        "associated_types", "assume", "assume_init", "*",
                        "async_await", "async_call", "async_call_mut",
                        "async_call_once", "async_closure", "async_drop",
                        "async_drop_in_place", "async_fn", "async_fn_in_dyn_trait",
                        "async_fn_in_trait", "async_fn_kind_helper",
                        "async_fn_kind_upvars", "async_fn_mut", "async_fn_once",
                        "async_fn_once_output", "async_fn_track_caller",
                        "async_fn_traits", "async_for_loop", "async_gen_internals",
                        "async_iterator", "async_iterator_poll_next",
                        "async_trait_bounds", "atomic", "atomic_and",
                        "atomic_cxchg", "atomic_cxchgweak", "atomic_fence",
                        "atomic_load", "atomic_max", "atomic_min", "atomic_mod",
                        "atomic_nand", "atomic_or", "atomic_singlethreadfence",
                        "atomic_store", "atomic_umax", "atomic_umin", "atomic_xadd",
                        "atomic_xchg", "atomic_xor", "atomic_xsub", "atomics",
                        "att_syntax", "attr", "attr_literals", "attribute",
                        "attributes", "audit_that", "augmented_assignments",
                        "auto_cfg", "auto_traits", "autodiff", "autodiff_forward",
                        "autodiff_reverse", "automatically_derived",
                        "available_externally", "avr", "avx",
                        "avx10_target_feature", "avx512_target_feature", "avx512bw",
                        "avx512f", "await_macro", "bang", "begin_panic", "bench",
                        "bevy_ecs", "bikeshed", "bikeshed_guaranteed_no_drop",
                        "bin", "binaryheap_iter", "bind_by_move_pattern_guards",
                        "bindings_after_at", "bit_width", "bitand", "bitand_assign",
                        "bitor", "bitor_assign", "bitreverse", "bitxor",
                        "bitxor_assign", "black_box", "block", "blocking", "bool",
                        "bool_then", "borrowck_graphviz_format",
                        "borrowck_graphviz_postflow", "box_new", "box_patterns",
                        "box_syntax", "boxed_slice", "bpf", "bpf_target_feature",
                        "braced_empty_structs", "branch", "breakpoint", "bridge",
                        "bswap", "btreemap_contains_key", "btreemap_insert",
                        "btreeset_iter", "built", "builtin_syntax", "bundle", "c",
                        "c_dash_variadic", "c_str", "c_str_literals", "c_unwind",
                        "c_variadic", "c_variadic_naked_functions", "c_void",
                        "call", "call_mut", "call_once", "call_once_future",
                        "call_ref_future", "caller", "caller_location",
                        "capture_disjoint_fields", "carrying_mul_add",
                        "catch_unwind", "cause", "cdylib", "ceilf16", "ceilf32",
                        "ceilf64", "ceilf128", "cfg", "cfg_accessible", "cfg_attr",
                        "cfg_attr_multi", "<cfg_attr_trace>",
                        "cfg_boolean_literals", "cfg_contract_checks",
                        "cfg_doctest", "cfg_emscripten_wasm_eh", "cfg_eval",
                        "cfg_fmt_debug", "cfg_overflow_checks", "cfg_panic",
                        "cfg_relocation_model", "cfg_sanitize", "cfg_sanitizer_cfi",
                        "cfg_select", "cfg_target_abi", "cfg_target_compact",
                        "cfg_target_feature", "cfg_target_has_atomic",
                        "cfg_target_has_atomic_equal_alignment",
                        "cfg_target_has_reliable_f16_f128",
                        "cfg_target_thread_local", "cfg_target_vendor",
                        "<cfg_trace>", "cfg_ub_checks", "cfg_version", "cfi",
                        "cfi_encoding", "char", "char_is_ascii", "char_to_digit",
                        "child_id", "child_kill", "client", "clippy", "clobber_abi",
                        "clone", "clone_closures", "clone_fn", "clone_from",
                        "closure", "closure_lifetime_binder",
                        "closure_to_fn_coercion", "closure_track_caller", "cmp",
                        "cmp_max", "cmp_min", "cmp_ord_max", "cmp_ord_min",
                        "cmp_partialeq_eq", "cmp_partialeq_ne",
                        "cmp_partialord_cmp", "cmp_partialord_ge",
                        "cmp_partialord_gt", "cmp_partialord_le",
                        "cmp_partialord_lt", "cmpxchg16b_target_feature",
                        "cmse_nonsecure_entry", "coerce_pointee_validated",
                        "coerce_shared", "coerce_unsized", "cold", "cold_path",
                        "collapse_debuginfo", "column", "common", "compare_bytes",
                        "compare_exchange", "compare_exchange_weak",
                        "compile_error", "compiler", "compiler_builtins",
                        "compiler_copy", "compiler_fence", "compiler_move",
                        "concat", "concat_bytes", "concat_idents",
                        "conservative_impl_trait", "console", "const_allocate",
                        "const_async_blocks", "const_closures",
                        "const_compare_raw_pointers", "const_constructor",
                        "const_continue", "const_deallocate", "const_destruct",
                        "const_eval_limit", "const_eval_select",
                        "const_evaluatable_checked", "const_extern_fn", "const_fn",
                        "const_fn_floating_point_arithmetic",
                        "const_fn_fn_ptr_basics", "const_fn_trait_bound",
                        "const_fn_transmute", "const_fn_union", "const_fn_unsize",
                        "const_for", "const_format_args", "const_generics",
                        "const_generics_defaults", "const_if_match",
                        "const_impl_trait", "const_in_array_repeat_expressions",
                        "const_indexing", "const_let", "const_loop",
                        "const_make_global", "const_mut_refs", "const_panic",
                        "const_panic_fmt", "const_param_ty",
                        "const_precise_live_drops", "const_ptr_cast",
                        "const_raw_ptr_deref", "const_raw_ptr_to_usize_cast",
                        "const_refs_to_cell", "const_refs_to_static",
                        "const_trait_bound_opt_out", "const_trait_impl",
                        "const_try", "<const_ty>", "constant", "constructor",
                        "contract_build_check_ensures", "contract_check_ensures",
                        "contract_check_requires", "contract_checks", "contracts",
                        "contracts_ensures", "contracts_internals",
                        "contracts_requires", "convert", "convert_identity", "copy",
                        "copy_closures", "copy_nonoverlapping", "copysignf16",
                        "copysignf32", "copysignf64", "copysignf128", "core",
                        "core_panic", "core_panic_2015_macro",
                        "core_panic_2021_macro", "core_panic_macro", "coroutine",
                        "coroutine_clone", "coroutine_resume", "coroutine_return",
                        "coroutine_state", "coroutine_yield", "coroutines",
                        "cosf16", "cosf32", "cosf64", "cosf128", "count",
                        "coverage", "coverage_attribute", "cr", "crate_in_paths",
                        "crate_local", "crate_name", "crate_type",
                        "crate_visibility_modifier", "crt-static", "csky",
                        "csky_target_feature", "cstr_type", "cstring_as_c_str",
                        "cstring_type", "ctlz", "ctlz_nonzero", "ctpop", "ctr",
                        "cttz", "cttz_nonzero", "custom_attribute",
                        "custom_code_classes_in_docs", "custom_derive",
                        "custom_inner_attributes", "custom_mir",
                        "custom_test_frameworks", "d", "d32", "dbg_macro",
                        "dead_code", "dealloc", "debug", "debug_assert_eq_macro",
                        "debug_assert_macro", "debug_assert_ne_macro",
                        "debug_assertions", "debug_struct",
                        "debug_struct_fields_finish", "debug_tuple",
                        "debug_tuple_fields_finish", "debugger_visualizer",
                        "decl_macro", "declare_lint_pass", "decode", "decorated",
                        "default_alloc_error_handler", "default_field_values",
                        "default_fn", "default_lib_allocator",
                        "default_method_body_is_const", "default_trait1",
                        "default_trait2", "default_trait3", "default_trait4",
                        "default_type_parameter_fallback", "default_type_params",
                        "define_opaque", "delayed_bug_from_inside_query", "deny",
                        "deprecated", "deprecated_safe", "deprecated_suggestion",
                        "deref", "deref_method", "deref_mut", "deref_mut_method",
                        "deref_patterns", "deref_pure", "deref_target", "derive",
                        "derive_coerce_pointee", "derive_const", "118304",
                        "derive_default_enum", "derive_from",
                        "derive_smart_pointer", "destruct",
                        "destructuring_assignment", "diagnostic",
                        "diagnostic_namespace", "diagnostic_on_const", "dialect",
                        "direct", "discriminant_kind", "discriminant_type",
                        "discriminant_value", "disjoint_bitor", "dispatch_from_dyn",
                        "div", "div_assign", "diverging_block_default", "dl",
                        "do_not_recommend", "doc", "doc_alias", "doc_auto_cfg",
                        "doc_cfg", "doc_cfg_hide", "doc_keyword", "doc_masked",
                        "doc_notable_trait", "doc_primitive", "doc_spotlight",
                        "doctest", "..", "dotdot_in_tuple_patterns",
                        "dotdoteq_in_patterns", "dreg", "dreg_low8", "dreg_low16",
                        "drop", "drop_in_place", "drop_types_in_const",
                        "dropck_eyepatch", "dropck_parametricity", "<!dummy!>",
                        "dummy_cgu_name", "dylib", "dyn_compatible_for_dispatch",
                        "dyn_metadata", "dyn_star", "dyn_trait", "dynamic-no-pic",
                        "e", "edition_panic", "effective_target_features",
                        "effects", "eh_catch_typeinfo", "eh_personality", "eii",
                        "eii_declaration", "eii_impl", "eii_internals",
                        "eii_shared_macro", "element_ty", "emit", "emit_enum",
                        "emit_enum_variant", "emit_enum_variant_arg", "emit_struct",
                        "emit_struct_field", "", "emscripten_wasm_eh", "enable",
                        "encode", "end", "entry_nops", "enumerate_method", "env",
                        "eprint_macro", "eprintln_macro", "eq", "ergonomic_clones",
                        "ermsb_target_feature", "exact_div", "except",
                        "exception-handling", "exchange_malloc",
                        "exclusive_range_pattern", "exhaustive_integer_patterns",
                        "exhaustive_patterns", "existential_type", "exp2f16",
                        "exp2f32", "exp2f64", "exp2f128", "expect", "expected",
                        "expf16", "expf32", "expf64", "expf128",
                        "explicit_extern_abis",
                        "explicit_generic_args_with_impl_trait",
                        "explicit_tail_calls", "export_name", "export_stable",
                        "expr", "expr_2021", "expr_fragment_specifier_2024",
                        "extended_key_value_attributes",
                        "extended_varargs_abi_support", "extern_absolute_paths",
                        "extern_crate_item_prelude", "extern_crate_self",
                        "extern_in_paths", "extern_item_impls", "extern_prelude",
                        "extern_system_varargs", "extern_types", "extern_weak",
                        "external", "external_doc", "f", "f16", "f16_consts_mod",
                        "f16_epsilon", "f16_nan", "f16c_target_feature", "f32",
                        "f32_consts_mod", "f32_epsilon", "f32_legacy_const_digits",
                        "f32_legacy_const_epsilon", "f32_legacy_const_infinity",
                        "f32_legacy_const_mantissa_dig", "f32_legacy_const_max",
                        "f32_legacy_const_max_10_exp", "f32_legacy_const_max_exp",
                        "f32_legacy_const_min", "f32_legacy_const_min_10_exp",
                        "f32_legacy_const_min_exp", "f32_legacy_const_min_positive",
                        "f32_legacy_const_nan", "f32_legacy_const_neg_infinity",
                        "f32_legacy_const_radix", "f32_nan", "f64",
                        "f64_consts_mod", "f64_epsilon", "f64_legacy_const_digits",
                        "f64_legacy_const_epsilon", "f64_legacy_const_infinity",
                        "f64_legacy_const_mantissa_dig", "f64_legacy_const_max",
                        "f64_legacy_const_max_10_exp", "f64_legacy_const_max_exp",
                        "f64_legacy_const_min", "f64_legacy_const_min_10_exp",
                        "f64_legacy_const_min_exp", "f64_legacy_const_min_positive",
                        "f64_legacy_const_nan", "f64_legacy_const_neg_infinity",
                        "f64_legacy_const_radix", "f64_nan", "f128",
                        "f128_consts_mod", "f128_epsilon", "f128_nan", "fabsf16",
                        "fabsf32", "fabsf64", "fabsf128", "fadd_algebraic",
                        "fadd_fast", "fake_variadic", "fallback", "fdiv_algebraic",
                        "fdiv_fast", "feature", "fence", "🦀", "fetch_update",
                        "ffi", "ffi_const", "ffi_pure", "ffi_returns_twice",
                        "field", "field_init_shorthand", "file", "file_options",
                        "flags", "float", "float_to_int_unchecked", "floorf16",
                        "floorf32", "floorf64", "floorf128", "fmaf16", "fmaf32",
                        "fmaf64", "fmaf128", "fmt", "fmt_debug", "fmul_algebraic",
                        "fmul_fast", "fmuladdf16", "fmuladdf32", "fmuladdf64",
                        "fmuladdf128", "fn_align", "fn_body", "fn_delegation",
                        "fn_must_use", "fn_mut", "fn_once", "fn_once_output",
                        "fn_ptr_addr", "fn_ptr_trait", "forbid",
                        "force_target_feature", "forget", "format", "format_args",
                        "format_args_capture", "format_args_macro",
                        "format_args_nl", "format_argument", "format_arguments",
                        "format_macro", "framework", "freeze", "freeze_impls",
                        "freg", "frem_algebraic", "frem_fast", "from",
                        "from_desugaring", "from_fn", "from_iter", "from_iter_fn",
                        "from_output", "from_residual", "from_size_align_unchecked",
                        "from_str", "from_str_method", "from_str_nonconst",
                        "from_u16", "from_usize", "from_yeet", "frontmatter",
                        "fs_create_dir", "fsub_algebraic", "fsub_fast", "full",
                        "fundamental", "fused_iterator", "future",
                        "future_drop_poll", "future_output", "future_trait", "fxsr",
                        "gdb_script_file", "ge", "gen_blocks", "gen_future",
                        "generator_clone", "generators", "generic_arg_infer",
                        "generic_assert", "generic_associated_types",
                        "generic_associated_types_extended", "generic_const_exprs",
                        "generic_const_items", "generic_const_parameter_types",
                        "generic_param_attrs", "generic_pattern_types",
                        "get_context", "global_alloc_ty", "global_allocator",
                        "global_asm", "global_registration", "globs", "gt",
                        "guard_patterns", "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", "hexagon_target_feature",
                        "hidden", "hide", "hint", "homogeneous_aggregate", "host",
                        "html_favicon_url", "html_logo_url", "html_no_source",
                        "html_playground_url", "html_root_url", "hwaddress", "i",
                        "i8", "i8_legacy_const_max", "i8_legacy_const_min",
                        "i8_legacy_fn_max_value", "i8_legacy_fn_min_value",
                        "i8_legacy_mod", "i16", "i16_legacy_const_max",
                        "i16_legacy_const_min", "i16_legacy_fn_max_value",
                        "i16_legacy_fn_min_value", "i16_legacy_mod", "i32",
                        "i32_legacy_const_max", "i32_legacy_const_min",
                        "i32_legacy_fn_max_value", "i32_legacy_fn_min_value",
                        "i32_legacy_mod", "i64", "i64_legacy_const_max",
                        "i64_legacy_const_min", "i64_legacy_fn_max_value",
                        "i64_legacy_fn_min_value", "i64_legacy_mod", "i128",
                        "i128_legacy_const_max", "i128_legacy_const_min",
                        "i128_legacy_fn_max_value", "i128_legacy_fn_min_value",
                        "i128_legacy_mod", "i128_type", "ident", "if_let",
                        "if_let_guard", "if_let_rescope", "if_while_or_patterns",
                        "ignore", "immediate-abort", "impl_header_lifetime_elision",
                        "impl_lint_pass", "impl_trait_in_assoc_type",
                        "impl_trait_in_bindings", "impl_trait_in_fn_trait_return",
                        "impl_trait_projections", "implement_via_object",
                        "implied_by", "import", "import_name_type",
                        "import_shadowing", "import_trait_associated_functions",
                        "imported_main", "in_band_lifetimes", "include",
                        "include_bytes", "include_bytes_macro", "include_str",
                        "include_str_macro", "inclusive_range_syntax", "index",
                        "index_mut", "infer_outlives_requirements",
                        "infer_static_outlives_requirements",
                        "inherent_associated_types", "inherit", "initial",
                        "inlateout", "inline", "inline_const", "inline_const_pat",
                        "inout", "instant_now", "instruction_set", "integer",
                        "integral", "internal", "internal_features",
                        "into_async_iter_into_iter", "into_future", "into_iter",
                        "into_try_type", "intra_doc_pointers", "intrinsics",
                        "intrinsics_unaligned_volatile_load",
                        "intrinsics_unaligned_volatile_store", "io_error_new",
                        "io_errorkind", "io_stderr", "io_stdout",
                        "irrefutable_let_patterns", "is", "is_val_statically_known",
                        "isa_attribute", "isize", "isize_legacy_const_max",
                        "isize_legacy_const_min", "isize_legacy_fn_max_value",
                        "isize_legacy_fn_min_value", "isize_legacy_mod", "issue",
                        "issue_5723_bootstrap", "issue_tracker_base_url", "item",
                        "item_like_imports", "iter", "iter_cloned", "iter_copied",
                        "iter_filter", "iter_mut", "iter_repeat", "iterator",
                        "iterator_collect_fn", "kcfi", "kernel_address",
                        "keylocker_x86", "keyword", "kind", "kreg", "kreg0",
                        "label", "label_break_value", "lahfsahf_target_feature",
                        "lang", "lang_items", "large_assignments", "last",
                        "lateout", "lazy_normalization_consts", "lazy_type_alias",
                        "le", "legacy_receiver", "len", "let_chains", "let_else",
                        "lhs", "lib", "libc", "lifetime",
                        "lifetime_capture_rules_2024", "lifetimes", "likely",
                        "line", "link", "link_arg_attribute", "link_args",
                        "link_cfg", "link-arg", "link_llvm_intrinsics", "link_name",
                        "link_ordinal", "link_section", "linkage", "linker",
                        "linker_messages", "linkonce", "linkonce_odr",
                        "lint_reasons", "literal", "load", "loaded_from_disk",
                        "local", "local_inner_macros", "log2f16", "log2f32",
                        "log2f64", "log2f128", "log10f16", "log10f32", "log10f64",
                        "log10f128", "log_syntax", "logf16", "logf32", "logf64",
                        "logf128", "loongarch32", "loongarch64",
                        "loongarch_target_feature", "loop_break_value",
                        "loop_match", "lr", "lt", "m68k", "m68k_target_feature",
                        "macro_at_most_once_rep", "macro_attr",
                        "macro_attributes_in_derive_output", "macro_concat",
                        "macro_derive", "macro_escape", "macro_export",
                        "macro_lifetime_matcher", "macro_literal_matcher",
                        "macro_metavar_expr", "macro_metavar_expr_concat",
                        "macro_reexport", "macro_use", "macro_vis_matcher",
                        "macros_in_extern", "main", "managed_boxes",
                        "manually_drop", "map", "map_err", "marker",
                        "marker_trait_attr", "masked", "match_beginning_vert",
                        "match_default_bindings", "matches_macro", "maximumf16",
                        "maximumf32", "maximumf64", "maximumf128", "maxnumf16",
                        "maxnumf32", "maxnumf64", "maxnumf128", "may_dangle",
                        "may_unwind", "maybe_uninit", "maybe_uninit_uninit",
                        "maybe_uninit_zeroed", "mem_align_const", "mem_align_of",
                        "mem_discriminant", "mem_drop", "mem_forget", "mem_replace",
                        "mem_size_const", "mem_size_of", "mem_size_of_val",
                        "mem_swap", "mem_uninitialized", "mem_variant_count",
                        "mem_zeroed", "member_constraints", "memory", "memtag",
                        "message", "meta", "meta_sized", "metadata_type",
                        "min_const_fn", "min_const_generics", "min_const_unsafe_fn",
                        "min_exhaustive_patterns", "min_generic_const_args",
                        "min_specialization", "min_type_alias_impl_trait",
                        "minimumf16", "minimumf32", "minimumf64", "minimumf128",
                        "minnumf16", "minnumf32", "minnumf64", "minnumf128", "mips",
                        "mips32r6", "mips64", "mips64r6", "mips_target_feature",
                        "mir_assume", "mir_basic_block", "mir_call",
                        "mir_cast_ptr_to_ptr", "mir_cast_transmute",
                        "mir_cast_unsize", "mir_checked", "mir_debuginfo",
                        "mir_deinit", "mir_discriminant", "mir_drop", "mir_field",
                        "mir_goto", "mir_len", "mir_make_place", "mir_move",
                        "mir_offset", "mir_ptr_metadata", "mir_retag", "mir_return",
                        "mir_return_to", "mir_set_discriminant", "mir_static",
                        "mir_static_mut", "mir_storage_dead", "mir_storage_live",
                        "mir_tail_call", "mir_unreachable", "mir_unwind_cleanup",
                        "mir_unwind_continue", "mir_unwind_resume",
                        "mir_unwind_terminate", "mir_unwind_terminate_reason",
                        "mir_unwind_unreachable", "mir_variant", "miri", "mmx_reg",
                        "modifiers", "module", "module_path", "more_maybe_bounds",
                        "more_qualified_paths", "more_struct_aliases",
                        "movbe_target_feature", "move_ref_pattern",
                        "move_size_limit", "movrs_target_feature", "msp430", "mul",
                        "mul_assign", "mul_with_overflow",
                        "multiple_supertrait_upcastable", "must_not_suspend",
                        "must_use", "mut_preserve_binding_mode_2024", "mut_ref",
                        "mutable", "naked", "naked_asm", "naked_functions",
                        "naked_functions_rustic_abi",
                        "naked_functions_target_feature", "name", "names",
                        "native_link_modifiers", "native_link_modifiers_as_needed",
                        "native_link_modifiers_bundle",
                        "native_link_modifiers_verbatim",
                        "native_link_modifiers_whole_archive", "natvis_file", "ne",
                        "needs_allocator", "needs_drop", "needs_panic_runtime",
                        "neg", "negate_unsigned", "negative_bounds",
                        "negative_impls", "neon", "nested", "never",
                        "never_patterns", "never_type", "never_type_fallback",
                        "new", "new_binary", "new_const", "new_debug",
                        "new_debug_noop", "new_display", "new_lower_exp",
                        "new_lower_hex", "new_octal", "new_pointer", "new_range",
                        "new_unchecked", "new_upper_exp", "new_upper_hex", "new_v1",
                        "new_v1_formatted", "next", "niko", "nll", "no",
                        "no_builtins", "no_core", "no_coverage", "no_crate_inject",
                        "no_debug", "no_default_passes", "no_implicit_prelude",
                        "no_inline", "no_link", "no_main", "no_mangle",
                        "no_sanitize", "no_stack_check", "no_std", "nomem",
                        "non_ascii_idents", "non_exhaustive",
                        "non_exhaustive_omitted_patterns_lint",
                        "non_lifetime_binders", "non_modrs_mods", "nonblocking",
                        "none", "nontemporal_store", "noop_method_borrow",
                        "noop_method_clone", "noop_method_deref", "noprefix",
                        "noreturn", "nostack", "not", "notable_trait", "note",
                        "null", "nvptx64", "nvptx_target_feature",
                        "object_safe_for_dispatch", "of", "off", "offload",
                        "offset", "offset_of", "offset_of_enum", "offset_of_nested",
                        "offset_of_slice", "ok_or_else", "old_name",
                        "omit_gdb_pretty_printer_section", "on", "on_const",
                        "on_unimplemented", "opaque", "<opaque>",
                        "open_options_new", "ops", "opt_out_copy", "optimize",
                        "optimize_attribute", "optimized", "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", "overlapping_marker_traits",
                        "owned_box", "packed", "packed_bundled_libs", "panic",
                        "panic_2015", "panic_2021", "panic_abort", "panic_any",
                        "panic_bounds_check", "panic_cannot_unwind",
                        "panic_const_add_overflow", "panic_const_async_fn_resumed",
                        "panic_const_async_fn_resumed_drop",
                        "panic_const_async_fn_resumed_panic",
                        "panic_const_async_gen_fn_resumed",
                        "panic_const_async_gen_fn_resumed_drop",
                        "panic_const_async_gen_fn_resumed_panic",
                        "panic_const_coroutine_resumed",
                        "panic_const_coroutine_resumed_drop",
                        "panic_const_coroutine_resumed_panic",
                        "panic_const_div_by_zero", "panic_const_div_overflow",
                        "panic_const_gen_fn_none", "panic_const_gen_fn_none_drop",
                        "panic_const_gen_fn_none_panic", "panic_const_mul_overflow",
                        "panic_const_neg_overflow", "panic_const_rem_by_zero",
                        "panic_const_rem_overflow", "panic_const_shl_overflow",
                        "panic_const_shr_overflow", "panic_const_sub_overflow",
                        "panic_display", "panic_fmt", "panic_handler", "panic_impl",
                        "panic_implementation", "panic_in_cleanup", "panic_info",
                        "panic_invalid_enum_construction", "panic_location",
                        "panic_misaligned_pointer_dereference", "panic_nounwind",
                        "panic_null_pointer_dereference", "panic_runtime",
                        "panic_str_2015", "panic_unwind", "panicking",
                        "param_attrs", "parent_label", "partial_cmp", "partial_ord",
                        "passes", "pat", "pat_param", "patchable_function_entry",
                        "path", "path_main_separator", "path_to_pathbuf",
                        "pathbuf_as_path", "pattern_complexity_limit",
                        "pattern_parentheses", "pattern_type",
                        "pattern_type_range_trait", "pattern_types",
                        "permissions_from_mode", "phantom_data", "phase", "pic",
                        "pie", "pin", "pin_ergonomics", "pin_macro", "pin_v2",
                        "platform_intrinsics", "plugin", "plugin_registrar",
                        "plugins", "pointee", "pointee_sized", "pointee_trait",
                        "pointer", "poll", "poll_next", "position", "post-cleanup",
                        "post-lto", "postfix_match", "powerpc", "powerpc64",
                        "powerpc_target_feature", "powf16", "powf32", "powf64",
                        "powf128", "powif16", "powif32", "powif64", "powif128",
                        "pre-lto", "precise_capturing",
                        "precise_capturing_in_traits",
                        "precise_pointer_size_matching", "precision",
                        "pref_align_of", "prefetch_read_data",
                        "prefetch_read_instruction", "prefetch_write_data",
                        "prefetch_write_instruction", "prefix_nops", "preg",
                        "prelude", "prelude_import", "preserves_flags",
                        "prfchw_target_feature", "print_macro", "println_macro",
                        "proc-macro", "proc_macro", "proc_macro_attribute",
                        "proc_macro_derive", "proc_macro_expr", "proc_macro_gen",
                        "proc_macro_hygiene", "proc_macro_internals",
                        "proc_macro_mod", "proc_macro_non_items",
                        "proc_macro_path_invoc", "process_abort", "process_exit",
                        "profiler_builtins", "profiler_runtime", "ptr", "ptr_cast",
                        "ptr_cast_const", "ptr_cast_mut", "ptr_const_is_null",
                        "ptr_copy", "ptr_copy_nonoverlapping", "ptr_eq",
                        "ptr_from_ref", "ptr_guaranteed_cmp", "ptr_is_null",
                        "ptr_mask", "ptr_metadata", "ptr_null", "ptr_null_mut",
                        "ptr_offset_from", "ptr_offset_from_unsigned", "ptr_read",
                        "ptr_read_unaligned", "ptr_read_volatile", "ptr_replace",
                        "ptr_slice_from_raw_parts", "ptr_slice_from_raw_parts_mut",
                        "ptr_swap", "ptr_swap_nonoverlapping",
                        "ptr_without_provenance", "ptr_without_provenance_mut",
                        "ptr_write", "ptr_write_bytes", "ptr_write_unaligned",
                        "ptr_write_volatile", "pub_macro_rules", "pub_restricted",
                        "public", "pure", "pushpop_unsafe", "qreg", "qreg_low4",
                        "qreg_low8", "quad_precision_float", "question_mark",
                        "quote", "range_inclusive_new", "range_step", "raw-dylib",
                        "raw_dylib", "raw_dylib_elf", "raw_eq", "raw_identifiers",
                        "raw_ref_op", "re_rebalance_coherence", "read_enum",
                        "read_enum_variant", "read_enum_variant_arg", "read_struct",
                        "read_struct_field", "read_via_copy", "readonly", "realloc",
                        "realtime", "reason", "reborrow", "receiver",
                        "receiver_target", "recursion_limit",
                        "reexport_test_harness_main", "ref_pat_eat_one_layer_2024",
                        "ref_pat_eat_one_layer_2024_structural",
                        "ref_pat_everywhere", "ref_unwind_safe_trait", "reference",
                        "reflect", "reg", "reg16", "reg32", "reg64", "reg_abcd",
                        "reg_addr", "reg_byte", "reg_data", "reg_iw", "reg_nonzero",
                        "reg_pair", "reg_ptr", "reg_upper", "register_attr",
                        "register_tool", "relaxed_adts", "relaxed_struct_unsize",
                        "relocation_model", "rem", "rem_assign", "repr", "repr128",
                        "repr_align", "repr_align_enum", "repr_packed", "repr_simd",
                        "repr_transparent", "require", "reserve-x18", "residual",
                        "result", "result_ffi_guarantees", "result_ok_method",
                        "resume", "return_position_impl_trait_in_trait",
                        "return_type_notation", "riscv32", "riscv64",
                        "riscv_target_feature", "rlib", "ropi", "ropi-rwpi",
                        "rotate_left", "rotate_right", "round_ties_even_f16",
                        "round_ties_even_f32", "round_ties_even_f64",
                        "round_ties_even_f128", "roundf16", "roundf32", "roundf64",
                        "roundf128", "rt", "rtm_target_feature", "runtime", "rust",
                        "rust_2015", "rust_2018", "rust_2018_preview", "rust_2021",
                        "rust_2024", "rust_analyzer", "rust_begin_unwind",
                        "rust_cold_cc", "rust_eh_catch_typeinfo",
                        "rust_eh_personality", "rust_future", "rust_logo",
                        "rust_out", "rustc", "rustc_abi", "rustc_align",
                        "rustc_align_static", "rustc_allocator",
                        "rustc_allocator_zeroed", "rustc_allocator_zeroed_variant",
                        "rustc_allow_const_fn_unstable",
                        "rustc_allow_incoherent_impl",
                        "rustc_allowed_through_unstable_modules", "rustc_as_ptr",
                        "rustc_attrs", "rustc_autodiff", "rustc_builtin_macro",
                        "rustc_capture_analysis", "rustc_clean",
                        "rustc_coherence_is_core", "rustc_coinductive",
                        "rustc_confusables", "rustc_const_stable",
                        "rustc_const_stable_indirect", "rustc_const_unstable",
                        "rustc_conversion_suggestion", "rustc_deallocator",
                        "rustc_def_path", "rustc_default_body_unstable",
                        "rustc_delayed_bug_from_inside_query",
                        "rustc_deny_explicit_impl", "rustc_deprecated_safe_2024",
                        "rustc_diagnostic_item", "rustc_diagnostic_macros",
                        "rustc_dirty", "rustc_do_not_const_check",
                        "rustc_do_not_implement_via_object", "rustc_doc_primitive",
                        "rustc_driver", "rustc_dummy", "rustc_dump_def_parents",
                        "rustc_dump_item_bounds", "rustc_dump_predicates",
                        "rustc_dump_user_args", "rustc_dump_vtable",
                        "rustc_effective_visibility", "rustc_eii_foreign_item",
                        "rustc_evaluate_where_clauses", "rustc_expected_cgu_reuse",
                        "rustc_force_inline", "rustc_has_incoherent_inherent_impls",
                        "rustc_hidden_type_of_opaques", "rustc_if_this_changed",
                        "rustc_inherit_overflow_checks", "rustc_insignificant_dtor",
                        "rustc_intrinsic", "rustc_intrinsic_const_stable_indirect",
                        "rustc_layout", "rustc_layout_scalar_valid_range_end",
                        "rustc_layout_scalar_valid_range_start",
                        "rustc_legacy_const_generics", "rustc_lint_diagnostics",
                        "rustc_lint_opt_deny_field_access", "rustc_lint_opt_ty",
                        "rustc_lint_query_instability",
                        "rustc_lint_untracked_query_information",
                        "rustc_macro_transparency", "rustc_main", "rustc_mir",
                        "rustc_must_implement_one_of",
                        "rustc_never_returns_null_ptr", "rustc_never_type_options",
                        "rustc_no_implicit_autorefs", "rustc_no_implicit_bounds",
                        "rustc_no_mir_inline",
                        "rustc_nonnull_optimization_guaranteed", "rustc_nounwind",
                        "rustc_objc_class", "rustc_objc_selector",
                        "rustc_object_lifetime_default", "rustc_offload_kernel",
                        "rustc_on_unimplemented", "rustc_outlives",
                        "rustc_paren_sugar", "rustc_partition_codegened",
                        "rustc_partition_reused", "rustc_pass_by_value",
                        "rustc_pass_indirectly_in_non_rustic_abis", "rustc_peek",
                        "rustc_peek_liveness", "rustc_peek_maybe_init",
                        "rustc_peek_maybe_uninit", "rustc_preserve_ub_checks",
                        "rustc_private", "rustc_proc_macro_decls",
                        "rustc_promotable", "rustc_pub_transparent",
                        "rustc_reallocator", "rustc_regions",
                        "rustc_reservation_impl", "rustc_scalable_vector",
                        "rustc_serialize",
                        "rustc_should_not_be_called_on_const_items",
                        "rustc_simd_monomorphize_lane_limit",
                        "rustc_skip_during_method_dispatch",
                        "rustc_specialization_trait", "rustc_std_internal_symbol",
                        "rustc_strict_coherence", "rustc_symbol_name",
                        "rustc_test_marker", "rustc_then_this_would_need",
                        "rustc_trivial_field_reads",
                        "rustc_unsafe_specialization_marker", "rustc_variance",
                        "rustc_variance_of_opaques", "rustdoc", "rustdoc_internals",
                        "rustdoc_missing_doc_code_examples", "rustfmt",
                        "rvalue_static_promotion", "rwpi", "s", "s390x",
                        "s390x_target_feature", "s390x_target_feature_vector",
                        "safety", "sanitize", "sanitizer_cfi_generalize_pointers",
                        "sanitizer_cfi_normalize_integers", "sanitizer_runtime",
                        "saturating_add", "saturating_div", "saturating_sub",
                        "sdylib", "search_unbox", "select_unpredictable",
                        "self_in_typedefs", "self_struct_ctor", "semiopaque",
                        "sha2", "sha3", "sha512_sm_x86", "shadow_call_stack",
                        "shallow", "shl", "shl_assign", "shorter_tail_lifetimes",
                        "should_panic", "show", "shr", "shr_assign", "sig_dfl",
                        "sig_ign", "signed", "simd", "simd_add", "simd_and",
                        "simd_arith_offset", "simd_as", "simd_bitmask",
                        "simd_bitreverse", "simd_bswap", "simd_cast",
                        "simd_cast_ptr", "simd_ceil", "simd_ctlz", "simd_ctpop",
                        "simd_cttz", "simd_div", "simd_eq",
                        "simd_expose_provenance", "simd_extract",
                        "simd_extract_dyn", "simd_fabs", "simd_fcos", "simd_fexp",
                        "simd_fexp2", "simd_ffi", "simd_flog", "simd_flog2",
                        "simd_flog10", "simd_floor", "simd_fma", "simd_fmax",
                        "simd_fmin", "simd_fsin", "simd_fsqrt", "simd_funnel_shl",
                        "simd_funnel_shr", "simd_gather", "simd_ge", "simd_gt",
                        "simd_insert", "simd_insert_dyn", "simd_le", "simd_lt",
                        "simd_masked_load", "simd_masked_store", "simd_mul",
                        "simd_ne", "simd_neg", "simd_or", "simd_reduce_add_ordered",
                        "simd_reduce_add_unordered", "simd_reduce_all",
                        "simd_reduce_and", "simd_reduce_any", "simd_reduce_max",
                        "simd_reduce_min", "simd_reduce_mul_ordered",
                        "simd_reduce_mul_unordered", "simd_reduce_or",
                        "simd_reduce_xor", "simd_relaxed_fma", "simd_rem",
                        "simd_round", "simd_round_ties_even", "simd_saturating_add",
                        "simd_saturating_sub", "simd_scatter", "simd_select",
                        "simd_select_bitmask", "simd_shl", "simd_shr",
                        "simd_shuffle", "simd_shuffle_const_generic", "simd_sub",
                        "simd_trunc", "simd_with_exposed_provenance", "simd_xor",
                        "since", "sinf16", "sinf32", "sinf64", "sinf128", "size",
                        "size_of", "size_of_val", "sized", "sized_hierarchy",
                        "skip", "slice", "slice_from_raw_parts",
                        "slice_from_raw_parts_mut", "slice_from_ref",
                        "slice_get_unchecked", "slice_into_vec", "slice_iter",
                        "slice_len_fn", "slice_patterns", "slicing_syntax", "soft",
                        "sparc", "sparc64", "sparc_target_feature", "spe_acc",
                        "specialization", "speed", "spirv", "spotlight", "sqrtf16",
                        "sqrtf32", "sqrtf64", "sqrtf128", "sreg", "sreg_low16",
                        "sse", "sse2", "sse4a_target_feature", "stable",
                        "staged_api", "start", "state", "static_align",
                        "static_in_const", "static_nobundle", "static_recursion",
                        "staticlib", "std", "std_lib_injection", "std_panic",
                        "std_panic_2015_macro", "std_panic_macro", "stmt",
                        "stmt_expr_attributes", "stop_after_dataflow", "store",
                        "str", "str_chars", "str_ends_with", "str_from_utf8",
                        "str_from_utf8_mut", "str_from_utf8_unchecked",
                        "str_from_utf8_unchecked_mut", "str_inherent_from_utf8",
                        "str_inherent_from_utf8_mut",
                        "str_inherent_from_utf8_unchecked",
                        "str_inherent_from_utf8_unchecked_mut", "str_len",
                        "str_split_whitespace", "str_starts_with", "str_trim",
                        "str_trim_end", "str_trim_start", "strict_provenance_lints",
                        "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",
                        "struct_variant", "structural_match", "structural_peq",
                        "sub", "sub_assign", "sub_with_overflow", "suggestion",
                        "super_let", "supertrait_item_shadowing", "sym", "sync",
                        "synthetic", "sys_mutex_lock", "sys_mutex_try_lock",
                        "sys_mutex_unlock", "t32", "target", "target_abi",
                        "target_arch", "target_endian", "target_env",
                        "target_family", "target_feature", "target_feature_11",
                        "target_feature_inline_always", "target_has_atomic",
                        "target_has_atomic_equal_alignment",
                        "target_has_atomic_load_store", "target_has_reliable_f16",
                        "target_has_reliable_f16_math", "target_has_reliable_f128",
                        "target_has_reliable_f128_math", "target_os",
                        "target_pointer_width", "target_thread_local",
                        "target_vendor", "tbm_target_feature", "termination",
                        "termination_trait", "termination_trait_test", "test",
                        "test_2018_feature", "test_accepted_feature", "test_case",
                        "test_removed_feature", "test_runner", "test_unstable_lint",
                        "thread", "thread_local", "thread_local_macro",
                        "three_way_compare", "thumb2", "thumb-mode", "tmm_reg",
                        "to_owned_method", "to_string", "to_string_method",
                        "to_vec", "todo_macro", "tool_attributes", "tool_lints",
                        "trace_macros", "track_caller", "trait_alias",
                        "trait_upcasting", "transmute", "transmute_generic_consts",
                        "transmute_opts", "transmute_trait", "transmute_unchecked",
                        "transparent", "transparent_enums", "transparent_unions",
                        "trivial_bounds", "trivial_clone", "truncf16", "truncf32",
                        "truncf64", "truncf128", "try_blocks",
                        "try_blocks_heterogeneous", "try_capture", "try_from",
                        "try_from_fn", "try_into", "try_trait_v2",
                        "try_trait_v2_residual", "try_update", "tt", "tuple",
                        "tuple_indexing", "tuple_trait", "two_phase", "ty",
                        "type_alias_enum_variants", "type_alias_impl_trait",
                        "type_ascribe", "type_ascription",
                        "type_changing_struct_update", "type_const", "type_id",
                        "type_id_eq", "type_info", "type_ir",
                        "type_ir_infer_ctxt_like", "type_ir_inherent",
                        "type_ir_interner", "type_length_limit", "type_macros",
                        "type_name", "type_of", "type_privacy_lints",
                        "typed_swap_nonoverlapping", "u8", "u8_legacy_const_max",
                        "u8_legacy_const_min", "u8_legacy_fn_max_value",
                        "u8_legacy_fn_min_value", "u8_legacy_mod", "u16",
                        "u16_legacy_const_max", "u16_legacy_const_min",
                        "u16_legacy_fn_max_value", "u16_legacy_fn_min_value",
                        "u16_legacy_mod", "u32", "u32_legacy_const_max",
                        "u32_legacy_const_min", "u32_legacy_fn_max_value",
                        "u32_legacy_fn_min_value", "u32_legacy_mod", "u64",
                        "u64_legacy_const_max", "u64_legacy_const_min",
                        "u64_legacy_fn_max_value", "u64_legacy_fn_min_value",
                        "u64_legacy_mod", "u128", "u128_legacy_const_max",
                        "u128_legacy_const_min", "u128_legacy_fn_max_value",
                        "u128_legacy_fn_min_value", "u128_legacy_mod", "ub_checks",
                        "unaligned_volatile_load", "unaligned_volatile_store",
                        "unboxed_closures", "unchecked_add", "unchecked_div",
                        "unchecked_funnel_shl", "unchecked_funnel_shr",
                        "unchecked_mul", "unchecked_rem", "unchecked_shl",
                        "unchecked_shr", "unchecked_sub", "undecorated",
                        "underscore_const_names", "underscore_imports",
                        "underscore_lifetimes", "uniform_paths",
                        "unimplemented_macro", "unit", "universal_impl_trait",
                        "unix", "unlikely", "unmarked_api", "unnamed_fields",
                        "unpin", "unqualified_local_imports", "unreachable",
                        "unreachable_2015", "unreachable_2015_macro",
                        "unreachable_2021", "unreachable_code",
                        "unreachable_display", "unreachable_macro",
                        "unrestricted_attribute_tokens", "unsafe_attributes",
                        "unsafe_binders", "unsafe_block_in_unsafe_fn",
                        "unsafe_cell", "unsafe_cell_raw_get", "unsafe_eii",
                        "unsafe_extern_blocks", "unsafe_fields",
                        "unsafe_no_drop_flag", "unsafe_pinned", "unsafe_unpin",
                        "unsize", "unsized_const_param_ty", "unsized_const_params",
                        "unsized_fn_params", "unsized_locals",
                        "unsized_tuple_coercion", "unstable",
                        "unstable_feature_bound",
                        "this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead?",
                        "untagged_unions", "unused_imports", "unwind",
                        "unwind_attributes", "unwind_safe_trait", "unwrap",
                        "unwrap_binder", "unwrap_or", "update", "use_cloned",
                        "use_extern_macros", "use_nested_groups", "used",
                        "used_with_arg", "using", "usize", "usize_legacy_const_max",
                        "usize_legacy_const_min", "usize_legacy_fn_max_value",
                        "usize_legacy_fn_min_value", "usize_legacy_mod", "v1",
                        "v8plus", "va_arg", "va_copy", "va_end", "va_list",
                        "va_start", "val", "validity", "value", "values", "var",
                        "variant_count", "vec", "vec_as_mut_slice", "vec_as_slice",
                        "vec_from_elem", "vec_is_empty", "vec_macro", "vec_new",
                        "vec_pop", "vec_reserve", "vec_with_capacity",
                        "vecdeque_iter", "vecdeque_reserve", "vector", "verbatim",
                        "version", "vfp2", "vis", "visible_private_types",
                        "volatile", "volatile_copy_memory",
                        "volatile_copy_nonoverlapping_memory", "volatile_load",
                        "volatile_set_memory", "volatile_store", "vreg",
                        "vreg_low16", "vsreg", "vsx", "vtable_align", "vtable_for",
                        "vtable_size", "warn", "wasip2", "wasm32", "wasm64",
                        "wasm_abi", "wasm_import_module", "wasm_target_feature",
                        "weak", "weak_odr", "where_clause_attrs", "while_let",
                        "whole-archive", "width", "windows", "windows_subsystem",
                        "with_negative_coherence", "wrap_binder", "wrapping_add",
                        "wrapping_div", "wrapping_mul", "wrapping_rem",
                        "wrapping_rem_euclid", "wrapping_sub", "wreg",
                        "write_bytes", "write_fmt", "write_macro", "write_str",
                        "write_via_move", "writeln_macro", "x86", "x86_64",
                        "x86_amx_intrinsics", "x87_reg", "x87_target_feature",
                        "xer", "xmm_reg", "xop_target_feature", "xtensa",
                        "yeet_desugar_details", "yeet_expr", "yes", "yield_expr",
                        "ymm_reg", "yreg", "zca", "zfh", "zfhmin", "zmm_reg",
                        "ztso", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9",
                        "1.94.0-beta.2"], extra_symbols)
    }
}symbols! {
25    // This list includes things that are definitely keywords (e.g. `if`), a
26    // few things that are definitely not keywords (e.g. `{{root}}`) and things
27    // where there is disagreement between people and/or documents (such as the
28    // Rust Reference) about whether it is a keyword (e.g. `_`).
29    //
30    // If you modify this list, adjust any relevant `Symbol::{is,can_be}_*`
31    // predicates and `used_keywords`. Also consider adding new keywords to the
32    // `ui/parser/raw/raw-idents.rs` test.
33    Keywords {
34        // Special reserved identifiers used internally for unnamed method
35        // parameters, crate root module, etc.
36        // Matching predicates: `is_special`/`is_reserved`
37        //
38        // tidy-alphabetical-start
39        DollarCrate:        "$crate",
40        PathRoot:           "{{root}}",
41        Underscore:         "_",
42        // tidy-alphabetical-end
43
44        // Keywords that are used in stable Rust.
45        // Matching predicates: `is_used_keyword_always`/`is_reserved`
46        // tidy-alphabetical-start
47        As:                 "as",
48        Break:              "break",
49        Const:              "const",
50        Continue:           "continue",
51        Crate:              "crate",
52        Else:               "else",
53        Enum:               "enum",
54        Extern:             "extern",
55        False:              "false",
56        Fn:                 "fn",
57        For:                "for",
58        If:                 "if",
59        Impl:               "impl",
60        In:                 "in",
61        Let:                "let",
62        Loop:               "loop",
63        Match:              "match",
64        Mod:                "mod",
65        Move:               "move",
66        Mut:                "mut",
67        Pub:                "pub",
68        Ref:                "ref",
69        Return:             "return",
70        SelfLower:          "self",
71        SelfUpper:          "Self",
72        Static:             "static",
73        Struct:             "struct",
74        Super:              "super",
75        Trait:              "trait",
76        True:               "true",
77        Type:               "type",
78        Unsafe:             "unsafe",
79        Use:                "use",
80        Where:              "where",
81        While:              "while",
82        // tidy-alphabetical-end
83
84        // Keywords that are used in unstable Rust or reserved for future use.
85        // Matching predicates: `is_unused_keyword_always`/`is_reserved`
86        // tidy-alphabetical-start
87        Abstract:           "abstract",
88        Become:             "become",
89        Box:                "box",
90        Do:                 "do",
91        Final:              "final",
92        Macro:              "macro",
93        Override:           "override",
94        Priv:               "priv",
95        Typeof:             "typeof",
96        Unsized:            "unsized",
97        Virtual:            "virtual",
98        Yield:              "yield",
99        // tidy-alphabetical-end
100
101        // Edition-specific keywords that are used in stable Rust.
102        // Matching predicates: `is_used_keyword_conditional`/`is_reserved` (if
103        // the edition suffices)
104        // tidy-alphabetical-start
105        Async:              "async", // >= 2018 Edition only
106        Await:              "await", // >= 2018 Edition only
107        Dyn:                "dyn", // >= 2018 Edition only
108        // tidy-alphabetical-end
109
110        // Edition-specific keywords that are used in unstable Rust or reserved for future use.
111        // Matching predicates: `is_unused_keyword_conditional`/`is_reserved` (if
112        // the edition suffices)
113        // tidy-alphabetical-start
114        Gen:                "gen", // >= 2024 Edition only
115        Try:                "try", // >= 2018 Edition only
116        // tidy-alphabetical-end
117
118        // "Lifetime keywords": regular keywords with a leading `'`.
119        // Matching predicates: none
120        // tidy-alphabetical-start
121        StaticLifetime:     "'static",
122        UnderscoreLifetime: "'_",
123        // tidy-alphabetical-end
124
125        // Weak keywords, have special meaning only in specific contexts.
126        // Matching predicates: `is_weak`
127        // tidy-alphabetical-start
128        Auto:               "auto",
129        Builtin:            "builtin",
130        Catch:              "catch",
131        ContractEnsures:    "contract_ensures",
132        ContractRequires:   "contract_requires",
133        Default:            "default",
134        MacroRules:         "macro_rules",
135        Raw:                "raw",
136        Reuse:              "reuse",
137        Safe:               "safe",
138        Union:              "union",
139        Yeet:               "yeet",
140        // tidy-alphabetical-end
141    }
142
143    // Pre-interned symbols that can be referred to with `rustc_span::sym::*`.
144    //
145    // The symbol is the stringified identifier unless otherwise specified, in
146    // which case the name should mention the non-identifier punctuation.
147    // E.g. `sym::proc_dash_macro` represents "proc-macro", and it shouldn't be
148    // called `sym::proc_macro` because then it's easy to mistakenly think it
149    // represents "proc_macro".
150    //
151    // As well as the symbols listed, there are symbols for the strings
152    // "0", "1", ..., "9", which are accessible via `sym::integer`.
153    //
154    // There is currently no checking that all symbols are used; that would be
155    // nice to have.
156    Symbols {
157        // tidy-alphabetical-start
158        Abi,
159        AcqRel,
160        Acquire,
161        Any,
162        Arc,
163        ArcWeak,
164        Argument,
165        Array,
166        ArrayIntoIter,
167        AsMut,
168        AsRef,
169        AssertParamIsClone,
170        AssertParamIsCopy,
171        AssertParamIsEq,
172        AsyncGenFinished,
173        AsyncGenPending,
174        AsyncGenReady,
175        AtomicBool,
176        AtomicI8,
177        AtomicI16,
178        AtomicI32,
179        AtomicI64,
180        AtomicI128,
181        AtomicIsize,
182        AtomicPtr,
183        AtomicU8,
184        AtomicU16,
185        AtomicU32,
186        AtomicU64,
187        AtomicU128,
188        AtomicUsize,
189        BTreeEntry,
190        BTreeMap,
191        BTreeSet,
192        BinaryHeap,
193        Bool,
194        Borrow,
195        BorrowMut,
196        Break,
197        BuildHasher,
198        C,
199        CStr,
200        C_dash_unwind: "C-unwind",
201        CallOnceFuture,
202        CallRefFuture,
203        Capture,
204        Cell,
205        Center,
206        Char,
207        Child,
208        Cleanup,
209        Clone,
210        CoercePointee,
211        CoercePointeeValidated,
212        CoerceUnsized,
213        Command,
214        ConstParamTy,
215        ConstParamTy_,
216        Context,
217        Continue,
218        ControlFlow,
219        Copy,
220        Cow,
221        Debug,
222        DebugStruct,
223        Decodable,
224        Decoder,
225        Default,
226        Deref,
227        DiagMessage,
228        Diagnostic,
229        DirBuilder,
230        DispatchFromDyn,
231        Display,
232        DoubleEndedIterator,
233        Duration,
234        Encodable,
235        Encoder,
236        Enumerate,
237        Eq,
238        Equal,
239        Err,
240        Error,
241        File,
242        FileType,
243        Float,
244        FmtArgumentsNew,
245        FmtWrite,
246        Fn,
247        FnMut,
248        FnOnce,
249        Formatter,
250        Forward,
251        From,
252        FromIterator,
253        FromResidual,
254        FsOpenOptions,
255        FsPermissions,
256        FusedIterator,
257        Future,
258        GlobalAlloc,
259        Hash,
260        HashMap,
261        HashMapEntry,
262        HashSet,
263        Hasher,
264        Implied,
265        InCleanup,
266        IndexOutput,
267        Input,
268        Instant,
269        Int,
270        Into,
271        IntoFuture,
272        IntoIterator,
273        IoBufRead,
274        IoLines,
275        IoRead,
276        IoSeek,
277        IoWrite,
278        IpAddr,
279        Ipv4Addr,
280        Ipv6Addr,
281        IrTyKind,
282        Is,
283        Item,
284        ItemContext,
285        IterEmpty,
286        IterOnce,
287        IterPeekable,
288        Iterator,
289        IteratorItem,
290        IteratorMap,
291        Layout,
292        Left,
293        LinkedList,
294        LintDiagnostic,
295        LintPass,
296        LocalKey,
297        Mutex,
298        MutexGuard,
299        N,
300        NonNull,
301        NonZero,
302        None,
303        Normal,
304        Ok,
305        Option,
306        Ord,
307        Ordering,
308        OsStr,
309        OsString,
310        Other,
311        Output,
312        Param,
313        ParamSet,
314        PartialEq,
315        PartialOrd,
316        Path,
317        PathBuf,
318        Pending,
319        PinCoerceUnsized,
320        PinDerefMutHelper,
321        Pointer,
322        Poll,
323        ProcMacro,
324        ProceduralMasqueradeDummyType,
325        Range,
326        RangeBounds,
327        RangeCopy,
328        RangeFrom,
329        RangeFromCopy,
330        RangeFull,
331        RangeInclusive,
332        RangeInclusiveCopy,
333        RangeMax,
334        RangeMin,
335        RangeSub,
336        RangeTo,
337        RangeToInclusive,
338        RangeToInclusiveCopy,
339        Rc,
340        RcWeak,
341        Ready,
342        Receiver,
343        RefCell,
344        RefCellRef,
345        RefCellRefMut,
346        Reference,
347        Relaxed,
348        Release,
349        Result,
350        ResumeTy,
351        Return,
352        Reverse,
353        Right,
354        Rust,
355        RustaceansAreAwesome,
356        RwLock,
357        RwLockReadGuard,
358        RwLockWriteGuard,
359        Saturating,
360        SeekFrom,
361        SelfTy,
362        Send,
363        SeqCst,
364        Sized,
365        SliceIndex,
366        SliceIter,
367        Some,
368        SpanCtxt,
369        Stdin,
370        Str,
371        String,
372        StructuralPartialEq,
373        SubdiagMessage,
374        Subdiagnostic,
375        SymbolIntern,
376        Sync,
377        SyncUnsafeCell,
378        T,
379        Target,
380        This,
381        ToOwned,
382        ToString,
383        TokenStream,
384        Trait,
385        TrivialClone,
386        Try,
387        TryCaptureGeneric,
388        TryCapturePrintable,
389        TryFrom,
390        TryInto,
391        Tuple,
392        Ty,
393        TyCtxt,
394        TyKind,
395        Unknown,
396        Unsize,
397        UnsizedConstParamTy,
398        Upvars,
399        Vec,
400        VecDeque,
401        Waker,
402        Wrapper,
403        Wrapping,
404        Yield,
405        _DECLS,
406        __D,
407        __H,
408        __S,
409        __T,
410        __awaitee,
411        __try_var,
412        _t,
413        _task_context,
414        a32,
415        aarch64,
416        aarch64_target_feature,
417        aarch64_unstable_target_feature,
418        aarch64_ver_target_feature,
419        abi,
420        abi_amdgpu_kernel,
421        abi_avr_interrupt,
422        abi_c_cmse_nonsecure_call,
423        abi_cmse_nonsecure_call,
424        abi_custom,
425        abi_efiapi,
426        abi_gpu_kernel,
427        abi_msp430_interrupt,
428        abi_ptx,
429        abi_riscv_interrupt,
430        abi_sysv64,
431        abi_thiscall,
432        abi_unadjusted,
433        abi_vectorcall,
434        abi_x86_interrupt,
435        abort,
436        add,
437        add_assign,
438        add_with_overflow,
439        address,
440        adt_const_params,
441        advanced_slice_patterns,
442        adx_target_feature,
443        aes,
444        aggregate_raw_ptr,
445        alias,
446        align,
447        align_of,
448        align_of_val,
449        alignment,
450        all,
451        alloc,
452        alloc_error_handler,
453        alloc_layout,
454        alloc_zeroed,
455        allocator,
456        allocator_api,
457        allocator_internals,
458        allow,
459        allow_fail,
460        allow_internal_unsafe,
461        allow_internal_unstable,
462        altivec,
463        alu32,
464        always,
465        amdgpu,
466        amdgpu_dispatch_ptr,
467        analysis,
468        and,
469        and_then,
470        anon,
471        anon_adt,
472        anon_assoc,
473        anonymous_lifetime_in_impl_trait,
474        any,
475        append_const_msg,
476        apx_target_feature,
477        arbitrary_enum_discriminant,
478        arbitrary_self_types,
479        arbitrary_self_types_pointers,
480        areg,
481        args,
482        arith_offset,
483        arm,
484        arm64ec,
485        arm_a32: "arm::a32",
486        arm_t32: "arm::t32",
487        arm_target_feature,
488        array,
489        as_dash_needed: "as-needed",
490        as_ptr,
491        as_ref,
492        as_str,
493        asm,
494        asm_cfg,
495        asm_const,
496        asm_experimental_arch,
497        asm_experimental_reg,
498        asm_goto,
499        asm_goto_with_outputs,
500        asm_sym,
501        asm_unwind,
502        assert,
503        assert_eq,
504        assert_eq_macro,
505        assert_inhabited,
506        assert_macro,
507        assert_mem_uninitialized_valid,
508        assert_ne_macro,
509        assert_receiver_is_total_eq,
510        assert_zero_valid,
511        asserting,
512        associated_const_equality,
513        associated_consts,
514        associated_type_bounds,
515        associated_type_defaults,
516        associated_types,
517        assume,
518        assume_init,
519        asterisk: "*",
520        async_await,
521        async_call,
522        async_call_mut,
523        async_call_once,
524        async_closure,
525        async_drop,
526        async_drop_in_place,
527        async_fn,
528        async_fn_in_dyn_trait,
529        async_fn_in_trait,
530        async_fn_kind_helper,
531        async_fn_kind_upvars,
532        async_fn_mut,
533        async_fn_once,
534        async_fn_once_output,
535        async_fn_track_caller,
536        async_fn_traits,
537        async_for_loop,
538        async_gen_internals,
539        async_iterator,
540        async_iterator_poll_next,
541        async_trait_bounds,
542        atomic,
543        atomic_and,
544        atomic_cxchg,
545        atomic_cxchgweak,
546        atomic_fence,
547        atomic_load,
548        atomic_max,
549        atomic_min,
550        atomic_mod,
551        atomic_nand,
552        atomic_or,
553        atomic_singlethreadfence,
554        atomic_store,
555        atomic_umax,
556        atomic_umin,
557        atomic_xadd,
558        atomic_xchg,
559        atomic_xor,
560        atomic_xsub,
561        atomics,
562        att_syntax,
563        attr,
564        attr_literals,
565        attribute,
566        attributes,
567        audit_that,
568        augmented_assignments,
569        auto_cfg,
570        auto_traits,
571        autodiff,
572        autodiff_forward,
573        autodiff_reverse,
574        automatically_derived,
575        available_externally,
576        avr,
577        avx,
578        avx10_target_feature,
579        avx512_target_feature,
580        avx512bw,
581        avx512f,
582        await_macro,
583        bang,
584        begin_panic,
585        bench,
586        bevy_ecs,
587        bikeshed,
588        bikeshed_guaranteed_no_drop,
589        bin,
590        binaryheap_iter,
591        bind_by_move_pattern_guards,
592        bindings_after_at,
593        bit_width,
594        bitand,
595        bitand_assign,
596        bitor,
597        bitor_assign,
598        bitreverse,
599        bitxor,
600        bitxor_assign,
601        black_box,
602        block,
603        blocking,
604        bool,
605        bool_then,
606        borrowck_graphviz_format,
607        borrowck_graphviz_postflow,
608        box_new,
609        box_patterns,
610        box_syntax,
611        boxed_slice,
612        bpf,
613        bpf_target_feature,
614        braced_empty_structs,
615        branch,
616        breakpoint,
617        bridge,
618        bswap,
619        btreemap_contains_key,
620        btreemap_insert,
621        btreeset_iter,
622        built,
623        builtin_syntax,
624        bundle,
625        c,
626        c_dash_variadic,
627        c_str,
628        c_str_literals,
629        c_unwind,
630        c_variadic,
631        c_variadic_naked_functions,
632        c_void,
633        call,
634        call_mut,
635        call_once,
636        call_once_future,
637        call_ref_future,
638        caller,
639        caller_location,
640        capture_disjoint_fields,
641        carrying_mul_add,
642        catch_unwind,
643        cause,
644        cdylib,
645        ceilf16,
646        ceilf32,
647        ceilf64,
648        ceilf128,
649        cfg,
650        cfg_accessible,
651        cfg_attr,
652        cfg_attr_multi,
653        cfg_attr_trace: "<cfg_attr_trace>", // must not be a valid identifier
654        cfg_boolean_literals,
655        cfg_contract_checks,
656        cfg_doctest,
657        cfg_emscripten_wasm_eh,
658        cfg_eval,
659        cfg_fmt_debug,
660        cfg_overflow_checks,
661        cfg_panic,
662        cfg_relocation_model,
663        cfg_sanitize,
664        cfg_sanitizer_cfi,
665        cfg_select,
666        cfg_target_abi,
667        cfg_target_compact,
668        cfg_target_feature,
669        cfg_target_has_atomic,
670        cfg_target_has_atomic_equal_alignment,
671        cfg_target_has_reliable_f16_f128,
672        cfg_target_thread_local,
673        cfg_target_vendor,
674        cfg_trace: "<cfg_trace>", // must not be a valid identifier
675        cfg_ub_checks,
676        cfg_version,
677        cfi,
678        cfi_encoding,
679        char,
680        char_is_ascii,
681        char_to_digit,
682        child_id,
683        child_kill,
684        client,
685        clippy,
686        clobber_abi,
687        clone,
688        clone_closures,
689        clone_fn,
690        clone_from,
691        closure,
692        closure_lifetime_binder,
693        closure_to_fn_coercion,
694        closure_track_caller,
695        cmp,
696        cmp_max,
697        cmp_min,
698        cmp_ord_max,
699        cmp_ord_min,
700        cmp_partialeq_eq,
701        cmp_partialeq_ne,
702        cmp_partialord_cmp,
703        cmp_partialord_ge,
704        cmp_partialord_gt,
705        cmp_partialord_le,
706        cmp_partialord_lt,
707        cmpxchg16b_target_feature,
708        cmse_nonsecure_entry,
709        coerce_pointee_validated,
710        coerce_shared,
711        coerce_unsized,
712        cold,
713        cold_path,
714        collapse_debuginfo,
715        column,
716        common,
717        compare_bytes,
718        compare_exchange,
719        compare_exchange_weak,
720        compile_error,
721        compiler,
722        compiler_builtins,
723        compiler_copy,
724        compiler_fence,
725        compiler_move,
726        concat,
727        concat_bytes,
728        concat_idents,
729        conservative_impl_trait,
730        console,
731        const_allocate,
732        const_async_blocks,
733        const_closures,
734        const_compare_raw_pointers,
735        const_constructor,
736        const_continue,
737        const_deallocate,
738        const_destruct,
739        const_eval_limit,
740        const_eval_select,
741        const_evaluatable_checked,
742        const_extern_fn,
743        const_fn,
744        const_fn_floating_point_arithmetic,
745        const_fn_fn_ptr_basics,
746        const_fn_trait_bound,
747        const_fn_transmute,
748        const_fn_union,
749        const_fn_unsize,
750        const_for,
751        const_format_args,
752        const_generics,
753        const_generics_defaults,
754        const_if_match,
755        const_impl_trait,
756        const_in_array_repeat_expressions,
757        const_indexing,
758        const_let,
759        const_loop,
760        const_make_global,
761        const_mut_refs,
762        const_panic,
763        const_panic_fmt,
764        const_param_ty,
765        const_precise_live_drops,
766        const_ptr_cast,
767        const_raw_ptr_deref,
768        const_raw_ptr_to_usize_cast,
769        const_refs_to_cell,
770        const_refs_to_static,
771        const_trait_bound_opt_out,
772        const_trait_impl,
773        const_try,
774        const_ty_placeholder: "<const_ty>",
775        constant,
776        constructor,
777        contract_build_check_ensures,
778        contract_check_ensures,
779        contract_check_requires,
780        contract_checks,
781        contracts,
782        contracts_ensures,
783        contracts_internals,
784        contracts_requires,
785        convert,
786        convert_identity,
787        copy,
788        copy_closures,
789        copy_nonoverlapping,
790        copysignf16,
791        copysignf32,
792        copysignf64,
793        copysignf128,
794        core,
795        core_panic,
796        core_panic_2015_macro,
797        core_panic_2021_macro,
798        core_panic_macro,
799        coroutine,
800        coroutine_clone,
801        coroutine_resume,
802        coroutine_return,
803        coroutine_state,
804        coroutine_yield,
805        coroutines,
806        cosf16,
807        cosf32,
808        cosf64,
809        cosf128,
810        count,
811        coverage,
812        coverage_attribute,
813        cr,
814        crate_in_paths,
815        crate_local,
816        crate_name,
817        crate_type,
818        crate_visibility_modifier,
819        crt_dash_static: "crt-static",
820        csky,
821        csky_target_feature,
822        cstr_type,
823        cstring_as_c_str,
824        cstring_type,
825        ctlz,
826        ctlz_nonzero,
827        ctpop,
828        ctr,
829        cttz,
830        cttz_nonzero,
831        custom_attribute,
832        custom_code_classes_in_docs,
833        custom_derive,
834        custom_inner_attributes,
835        custom_mir,
836        custom_test_frameworks,
837        d,
838        d32,
839        dbg_macro,
840        dead_code,
841        dealloc,
842        debug,
843        debug_assert_eq_macro,
844        debug_assert_macro,
845        debug_assert_ne_macro,
846        debug_assertions,
847        debug_struct,
848        debug_struct_fields_finish,
849        debug_tuple,
850        debug_tuple_fields_finish,
851        debugger_visualizer,
852        decl_macro,
853        declare_lint_pass,
854        decode,
855        decorated,
856        default_alloc_error_handler,
857        default_field_values,
858        default_fn,
859        default_lib_allocator,
860        default_method_body_is_const,
861        // --------------------------
862        // Lang items which are used only for experiments with auto traits with default bounds.
863        // These lang items are not actually defined in core/std. Experiment is a part of
864        // `MCP: Low level components for async drop`(https://github.com/rust-lang/compiler-team/issues/727)
865        default_trait1,
866        default_trait2,
867        default_trait3,
868        default_trait4,
869        // --------------------------
870        default_type_parameter_fallback,
871        default_type_params,
872        define_opaque,
873        delayed_bug_from_inside_query,
874        deny,
875        deprecated,
876        deprecated_safe,
877        deprecated_suggestion,
878        deref,
879        deref_method,
880        deref_mut,
881        deref_mut_method,
882        deref_patterns,
883        deref_pure,
884        deref_target,
885        derive,
886        derive_coerce_pointee,
887        derive_const,
888        derive_const_issue: "118304",
889        derive_default_enum,
890        derive_from,
891        derive_smart_pointer,
892        destruct,
893        destructuring_assignment,
894        diagnostic,
895        diagnostic_namespace,
896        diagnostic_on_const,
897        dialect,
898        direct,
899        discriminant_kind,
900        discriminant_type,
901        discriminant_value,
902        disjoint_bitor,
903        dispatch_from_dyn,
904        div,
905        div_assign,
906        diverging_block_default,
907        dl,
908        do_not_recommend,
909        doc,
910        doc_alias,
911        doc_auto_cfg,
912        doc_cfg,
913        doc_cfg_hide,
914        doc_keyword,
915        doc_masked,
916        doc_notable_trait,
917        doc_primitive,
918        doc_spotlight,
919        doctest,
920        dotdot: "..",
921        dotdot_in_tuple_patterns,
922        dotdoteq_in_patterns,
923        dreg,
924        dreg_low8,
925        dreg_low16,
926        drop,
927        drop_in_place,
928        drop_types_in_const,
929        dropck_eyepatch,
930        dropck_parametricity,
931        dummy: "<!dummy!>", // use this instead of `sym::empty` for symbols that won't be used
932        dummy_cgu_name,
933        dylib,
934        dyn_compatible_for_dispatch,
935        dyn_metadata,
936        dyn_star,
937        dyn_trait,
938        dynamic_no_pic: "dynamic-no-pic",
939        e,
940        edition_panic,
941        effective_target_features,
942        effects,
943        eh_catch_typeinfo,
944        eh_personality,
945        eii,
946        eii_declaration,
947        eii_impl,
948        eii_internals,
949        eii_shared_macro,
950        element_ty,
951        emit,
952        emit_enum,
953        emit_enum_variant,
954        emit_enum_variant_arg,
955        emit_struct,
956        emit_struct_field,
957        // Notes about `sym::empty`:
958        // - It should only be used when it genuinely means "empty symbol". Use
959        //   `Option<Symbol>` when "no symbol" is a possibility.
960        // - For dummy symbols that are never used and absolutely must be
961        //   present, it's better to use `sym::dummy` than `sym::empty`, because
962        //   it's clearer that it's intended as a dummy value, and more likely
963        //   to be detected if it accidentally does get used.
964        empty: "",
965        emscripten_wasm_eh,
966        enable,
967        encode,
968        end,
969        entry_nops,
970        enumerate_method,
971        env,
972        env_CFG_RELEASE: env!("CFG_RELEASE"),
973        eprint_macro,
974        eprintln_macro,
975        eq,
976        ergonomic_clones,
977        ermsb_target_feature,
978        exact_div,
979        except,
980        exception_handling: "exception-handling",
981        exchange_malloc,
982        exclusive_range_pattern,
983        exhaustive_integer_patterns,
984        exhaustive_patterns,
985        existential_type,
986        exp2f16,
987        exp2f32,
988        exp2f64,
989        exp2f128,
990        expect,
991        expected,
992        expf16,
993        expf32,
994        expf64,
995        expf128,
996        explicit_extern_abis,
997        explicit_generic_args_with_impl_trait,
998        explicit_tail_calls,
999        export_name,
1000        export_stable,
1001        expr,
1002        expr_2021,
1003        expr_fragment_specifier_2024,
1004        extended_key_value_attributes,
1005        extended_varargs_abi_support,
1006        extern_absolute_paths,
1007        extern_crate_item_prelude,
1008        extern_crate_self,
1009        extern_in_paths,
1010        extern_item_impls,
1011        extern_prelude,
1012        extern_system_varargs,
1013        extern_types,
1014        extern_weak,
1015        external,
1016        external_doc,
1017        f,
1018        f16,
1019        f16_consts_mod,
1020        f16_epsilon,
1021        f16_nan,
1022        f16c_target_feature,
1023        f32,
1024        f32_consts_mod,
1025        f32_epsilon,
1026        f32_legacy_const_digits,
1027        f32_legacy_const_epsilon,
1028        f32_legacy_const_infinity,
1029        f32_legacy_const_mantissa_dig,
1030        f32_legacy_const_max,
1031        f32_legacy_const_max_10_exp,
1032        f32_legacy_const_max_exp,
1033        f32_legacy_const_min,
1034        f32_legacy_const_min_10_exp,
1035        f32_legacy_const_min_exp,
1036        f32_legacy_const_min_positive,
1037        f32_legacy_const_nan,
1038        f32_legacy_const_neg_infinity,
1039        f32_legacy_const_radix,
1040        f32_nan,
1041        f64,
1042        f64_consts_mod,
1043        f64_epsilon,
1044        f64_legacy_const_digits,
1045        f64_legacy_const_epsilon,
1046        f64_legacy_const_infinity,
1047        f64_legacy_const_mantissa_dig,
1048        f64_legacy_const_max,
1049        f64_legacy_const_max_10_exp,
1050        f64_legacy_const_max_exp,
1051        f64_legacy_const_min,
1052        f64_legacy_const_min_10_exp,
1053        f64_legacy_const_min_exp,
1054        f64_legacy_const_min_positive,
1055        f64_legacy_const_nan,
1056        f64_legacy_const_neg_infinity,
1057        f64_legacy_const_radix,
1058        f64_nan,
1059        f128,
1060        f128_consts_mod,
1061        f128_epsilon,
1062        f128_nan,
1063        fabsf16,
1064        fabsf32,
1065        fabsf64,
1066        fabsf128,
1067        fadd_algebraic,
1068        fadd_fast,
1069        fake_variadic,
1070        fallback,
1071        fdiv_algebraic,
1072        fdiv_fast,
1073        feature,
1074        fence,
1075        ferris: "🦀",
1076        fetch_update,
1077        ffi,
1078        ffi_const,
1079        ffi_pure,
1080        ffi_returns_twice,
1081        field,
1082        field_init_shorthand,
1083        file,
1084        file_options,
1085        flags,
1086        float,
1087        float_to_int_unchecked,
1088        floorf16,
1089        floorf32,
1090        floorf64,
1091        floorf128,
1092        fmaf16,
1093        fmaf32,
1094        fmaf64,
1095        fmaf128,
1096        fmt,
1097        fmt_debug,
1098        fmul_algebraic,
1099        fmul_fast,
1100        fmuladdf16,
1101        fmuladdf32,
1102        fmuladdf64,
1103        fmuladdf128,
1104        fn_align,
1105        fn_body,
1106        fn_delegation,
1107        fn_must_use,
1108        fn_mut,
1109        fn_once,
1110        fn_once_output,
1111        fn_ptr_addr,
1112        fn_ptr_trait,
1113        forbid,
1114        force_target_feature,
1115        forget,
1116        format,
1117        format_args,
1118        format_args_capture,
1119        format_args_macro,
1120        format_args_nl,
1121        format_argument,
1122        format_arguments,
1123        format_macro,
1124        framework,
1125        freeze,
1126        freeze_impls,
1127        freg,
1128        frem_algebraic,
1129        frem_fast,
1130        from,
1131        from_desugaring,
1132        from_fn,
1133        from_iter,
1134        from_iter_fn,
1135        from_output,
1136        from_residual,
1137        from_size_align_unchecked,
1138        from_str,
1139        from_str_method,
1140        from_str_nonconst,
1141        from_u16,
1142        from_usize,
1143        from_yeet,
1144        frontmatter,
1145        fs_create_dir,
1146        fsub_algebraic,
1147        fsub_fast,
1148        full,
1149        fundamental,
1150        fused_iterator,
1151        future,
1152        future_drop_poll,
1153        future_output,
1154        future_trait,
1155        fxsr,
1156        gdb_script_file,
1157        ge,
1158        gen_blocks,
1159        gen_future,
1160        generator_clone,
1161        generators,
1162        generic_arg_infer,
1163        generic_assert,
1164        generic_associated_types,
1165        generic_associated_types_extended,
1166        generic_const_exprs,
1167        generic_const_items,
1168        generic_const_parameter_types,
1169        generic_param_attrs,
1170        generic_pattern_types,
1171        get_context,
1172        global_alloc_ty,
1173        global_allocator,
1174        global_asm,
1175        global_registration,
1176        globs,
1177        gt,
1178        guard_patterns,
1179        half_open_range_patterns,
1180        half_open_range_patterns_in_slices,
1181        hash,
1182        hashmap_contains_key,
1183        hashmap_drain_ty,
1184        hashmap_insert,
1185        hashmap_iter_mut_ty,
1186        hashmap_iter_ty,
1187        hashmap_keys_ty,
1188        hashmap_values_mut_ty,
1189        hashmap_values_ty,
1190        hashset_drain_ty,
1191        hashset_iter,
1192        hashset_iter_ty,
1193        hexagon,
1194        hexagon_target_feature,
1195        hidden,
1196        hide,
1197        hint,
1198        homogeneous_aggregate,
1199        host,
1200        html_favicon_url,
1201        html_logo_url,
1202        html_no_source,
1203        html_playground_url,
1204        html_root_url,
1205        hwaddress,
1206        i,
1207        i8,
1208        i8_legacy_const_max,
1209        i8_legacy_const_min,
1210        i8_legacy_fn_max_value,
1211        i8_legacy_fn_min_value,
1212        i8_legacy_mod,
1213        i16,
1214        i16_legacy_const_max,
1215        i16_legacy_const_min,
1216        i16_legacy_fn_max_value,
1217        i16_legacy_fn_min_value,
1218        i16_legacy_mod,
1219        i32,
1220        i32_legacy_const_max,
1221        i32_legacy_const_min,
1222        i32_legacy_fn_max_value,
1223        i32_legacy_fn_min_value,
1224        i32_legacy_mod,
1225        i64,
1226        i64_legacy_const_max,
1227        i64_legacy_const_min,
1228        i64_legacy_fn_max_value,
1229        i64_legacy_fn_min_value,
1230        i64_legacy_mod,
1231        i128,
1232        i128_legacy_const_max,
1233        i128_legacy_const_min,
1234        i128_legacy_fn_max_value,
1235        i128_legacy_fn_min_value,
1236        i128_legacy_mod,
1237        i128_type,
1238        ident,
1239        if_let,
1240        if_let_guard,
1241        if_let_rescope,
1242        if_while_or_patterns,
1243        ignore,
1244        immediate_abort: "immediate-abort",
1245        impl_header_lifetime_elision,
1246        impl_lint_pass,
1247        impl_trait_in_assoc_type,
1248        impl_trait_in_bindings,
1249        impl_trait_in_fn_trait_return,
1250        impl_trait_projections,
1251        implement_via_object,
1252        implied_by,
1253        import,
1254        import_name_type,
1255        import_shadowing,
1256        import_trait_associated_functions,
1257        imported_main,
1258        in_band_lifetimes,
1259        include,
1260        include_bytes,
1261        include_bytes_macro,
1262        include_str,
1263        include_str_macro,
1264        inclusive_range_syntax,
1265        index,
1266        index_mut,
1267        infer_outlives_requirements,
1268        infer_static_outlives_requirements,
1269        inherent_associated_types,
1270        inherit,
1271        initial,
1272        inlateout,
1273        inline,
1274        inline_const,
1275        inline_const_pat,
1276        inout,
1277        instant_now,
1278        instruction_set,
1279        integer_: "integer", // underscore to avoid clashing with the function `sym::integer` below
1280        integral,
1281        internal,
1282        internal_features,
1283        into_async_iter_into_iter,
1284        into_future,
1285        into_iter,
1286        into_try_type,
1287        intra_doc_pointers,
1288        intrinsics,
1289        intrinsics_unaligned_volatile_load,
1290        intrinsics_unaligned_volatile_store,
1291        io_error_new,
1292        io_errorkind,
1293        io_stderr,
1294        io_stdout,
1295        irrefutable_let_patterns,
1296        is,
1297        is_val_statically_known,
1298        isa_attribute,
1299        isize,
1300        isize_legacy_const_max,
1301        isize_legacy_const_min,
1302        isize_legacy_fn_max_value,
1303        isize_legacy_fn_min_value,
1304        isize_legacy_mod,
1305        issue,
1306        issue_5723_bootstrap,
1307        issue_tracker_base_url,
1308        item,
1309        item_like_imports,
1310        iter,
1311        iter_cloned,
1312        iter_copied,
1313        iter_filter,
1314        iter_mut,
1315        iter_repeat,
1316        iterator,
1317        iterator_collect_fn,
1318        kcfi,
1319        kernel_address,
1320        keylocker_x86,
1321        keyword,
1322        kind,
1323        kreg,
1324        kreg0,
1325        label,
1326        label_break_value,
1327        lahfsahf_target_feature,
1328        lang,
1329        lang_items,
1330        large_assignments,
1331        last,
1332        lateout,
1333        lazy_normalization_consts,
1334        lazy_type_alias,
1335        le,
1336        legacy_receiver,
1337        len,
1338        let_chains,
1339        let_else,
1340        lhs,
1341        lib,
1342        libc,
1343        lifetime,
1344        lifetime_capture_rules_2024,
1345        lifetimes,
1346        likely,
1347        line,
1348        link,
1349        link_arg_attribute,
1350        link_args,
1351        link_cfg,
1352        link_dash_arg: "link-arg",
1353        link_llvm_intrinsics,
1354        link_name,
1355        link_ordinal,
1356        link_section,
1357        linkage,
1358        linker,
1359        linker_messages,
1360        linkonce,
1361        linkonce_odr,
1362        lint_reasons,
1363        literal,
1364        load,
1365        loaded_from_disk,
1366        local,
1367        local_inner_macros,
1368        log2f16,
1369        log2f32,
1370        log2f64,
1371        log2f128,
1372        log10f16,
1373        log10f32,
1374        log10f64,
1375        log10f128,
1376        log_syntax,
1377        logf16,
1378        logf32,
1379        logf64,
1380        logf128,
1381        loongarch32,
1382        loongarch64,
1383        loongarch_target_feature,
1384        loop_break_value,
1385        loop_match,
1386        lr,
1387        lt,
1388        m68k,
1389        m68k_target_feature,
1390        macro_at_most_once_rep,
1391        macro_attr,
1392        macro_attributes_in_derive_output,
1393        macro_concat,
1394        macro_derive,
1395        macro_escape,
1396        macro_export,
1397        macro_lifetime_matcher,
1398        macro_literal_matcher,
1399        macro_metavar_expr,
1400        macro_metavar_expr_concat,
1401        macro_reexport,
1402        macro_use,
1403        macro_vis_matcher,
1404        macros_in_extern,
1405        main,
1406        managed_boxes,
1407        manually_drop,
1408        map,
1409        map_err,
1410        marker,
1411        marker_trait_attr,
1412        masked,
1413        match_beginning_vert,
1414        match_default_bindings,
1415        matches_macro,
1416        maximumf16,
1417        maximumf32,
1418        maximumf64,
1419        maximumf128,
1420        maxnumf16,
1421        maxnumf32,
1422        maxnumf64,
1423        maxnumf128,
1424        may_dangle,
1425        may_unwind,
1426        maybe_uninit,
1427        maybe_uninit_uninit,
1428        maybe_uninit_zeroed,
1429        mem_align_const,
1430        mem_align_of,
1431        mem_discriminant,
1432        mem_drop,
1433        mem_forget,
1434        mem_replace,
1435        mem_size_const,
1436        mem_size_of,
1437        mem_size_of_val,
1438        mem_swap,
1439        mem_uninitialized,
1440        mem_variant_count,
1441        mem_zeroed,
1442        member_constraints,
1443        memory,
1444        memtag,
1445        message,
1446        meta,
1447        meta_sized,
1448        metadata_type,
1449        min_const_fn,
1450        min_const_generics,
1451        min_const_unsafe_fn,
1452        min_exhaustive_patterns,
1453        min_generic_const_args,
1454        min_specialization,
1455        min_type_alias_impl_trait,
1456        minimumf16,
1457        minimumf32,
1458        minimumf64,
1459        minimumf128,
1460        minnumf16,
1461        minnumf32,
1462        minnumf64,
1463        minnumf128,
1464        mips,
1465        mips32r6,
1466        mips64,
1467        mips64r6,
1468        mips_target_feature,
1469        mir_assume,
1470        mir_basic_block,
1471        mir_call,
1472        mir_cast_ptr_to_ptr,
1473        mir_cast_transmute,
1474        mir_cast_unsize,
1475        mir_checked,
1476        mir_debuginfo,
1477        mir_deinit,
1478        mir_discriminant,
1479        mir_drop,
1480        mir_field,
1481        mir_goto,
1482        mir_len,
1483        mir_make_place,
1484        mir_move,
1485        mir_offset,
1486        mir_ptr_metadata,
1487        mir_retag,
1488        mir_return,
1489        mir_return_to,
1490        mir_set_discriminant,
1491        mir_static,
1492        mir_static_mut,
1493        mir_storage_dead,
1494        mir_storage_live,
1495        mir_tail_call,
1496        mir_unreachable,
1497        mir_unwind_cleanup,
1498        mir_unwind_continue,
1499        mir_unwind_resume,
1500        mir_unwind_terminate,
1501        mir_unwind_terminate_reason,
1502        mir_unwind_unreachable,
1503        mir_variant,
1504        miri,
1505        mmx_reg,
1506        modifiers,
1507        module,
1508        module_path,
1509        more_maybe_bounds,
1510        more_qualified_paths,
1511        more_struct_aliases,
1512        movbe_target_feature,
1513        move_ref_pattern,
1514        move_size_limit,
1515        movrs_target_feature,
1516        msp430,
1517        mul,
1518        mul_assign,
1519        mul_with_overflow,
1520        multiple_supertrait_upcastable,
1521        must_not_suspend,
1522        must_use,
1523        mut_preserve_binding_mode_2024,
1524        mut_ref,
1525        mutable,
1526        naked,
1527        naked_asm,
1528        naked_functions,
1529        naked_functions_rustic_abi,
1530        naked_functions_target_feature,
1531        name,
1532        names,
1533        native_link_modifiers,
1534        native_link_modifiers_as_needed,
1535        native_link_modifiers_bundle,
1536        native_link_modifiers_verbatim,
1537        native_link_modifiers_whole_archive,
1538        natvis_file,
1539        ne,
1540        needs_allocator,
1541        needs_drop,
1542        needs_panic_runtime,
1543        neg,
1544        negate_unsigned,
1545        negative_bounds,
1546        negative_impls,
1547        neon,
1548        nested,
1549        never,
1550        never_patterns,
1551        never_type,
1552        never_type_fallback,
1553        new,
1554        new_binary,
1555        new_const,
1556        new_debug,
1557        new_debug_noop,
1558        new_display,
1559        new_lower_exp,
1560        new_lower_hex,
1561        new_octal,
1562        new_pointer,
1563        new_range,
1564        new_unchecked,
1565        new_upper_exp,
1566        new_upper_hex,
1567        new_v1,
1568        new_v1_formatted,
1569        next,
1570        niko,
1571        nll,
1572        no,
1573        no_builtins,
1574        no_core,
1575        no_coverage,
1576        no_crate_inject,
1577        no_debug,
1578        no_default_passes,
1579        no_implicit_prelude,
1580        no_inline,
1581        no_link,
1582        no_main,
1583        no_mangle,
1584        no_sanitize,
1585        no_stack_check,
1586        no_std,
1587        nomem,
1588        non_ascii_idents,
1589        non_exhaustive,
1590        non_exhaustive_omitted_patterns_lint,
1591        non_lifetime_binders,
1592        non_modrs_mods,
1593        nonblocking,
1594        none,
1595        nontemporal_store,
1596        noop_method_borrow,
1597        noop_method_clone,
1598        noop_method_deref,
1599        noprefix,
1600        noreturn,
1601        nostack,
1602        not,
1603        notable_trait,
1604        note,
1605        null,
1606        nvptx64,
1607        nvptx_target_feature,
1608        object_safe_for_dispatch,
1609        of,
1610        off,
1611        offload,
1612        offset,
1613        offset_of,
1614        offset_of_enum,
1615        offset_of_nested,
1616        offset_of_slice,
1617        ok_or_else,
1618        old_name,
1619        omit_gdb_pretty_printer_section,
1620        on,
1621        on_const,
1622        on_unimplemented,
1623        opaque,
1624        opaque_module_name_placeholder: "<opaque>",
1625        open_options_new,
1626        ops,
1627        opt_out_copy,
1628        optimize,
1629        optimize_attribute,
1630        optimized,
1631        optin_builtin_traits,
1632        option,
1633        option_env,
1634        option_expect,
1635        option_unwrap,
1636        options,
1637        or,
1638        or_patterns,
1639        ord_cmp_method,
1640        os_str_to_os_string,
1641        os_string_as_os_str,
1642        other,
1643        out,
1644        overflow_checks,
1645        overlapping_marker_traits,
1646        owned_box,
1647        packed,
1648        packed_bundled_libs,
1649        panic,
1650        panic_2015,
1651        panic_2021,
1652        panic_abort,
1653        panic_any,
1654        panic_bounds_check,
1655        panic_cannot_unwind,
1656        panic_const_add_overflow,
1657        panic_const_async_fn_resumed,
1658        panic_const_async_fn_resumed_drop,
1659        panic_const_async_fn_resumed_panic,
1660        panic_const_async_gen_fn_resumed,
1661        panic_const_async_gen_fn_resumed_drop,
1662        panic_const_async_gen_fn_resumed_panic,
1663        panic_const_coroutine_resumed,
1664        panic_const_coroutine_resumed_drop,
1665        panic_const_coroutine_resumed_panic,
1666        panic_const_div_by_zero,
1667        panic_const_div_overflow,
1668        panic_const_gen_fn_none,
1669        panic_const_gen_fn_none_drop,
1670        panic_const_gen_fn_none_panic,
1671        panic_const_mul_overflow,
1672        panic_const_neg_overflow,
1673        panic_const_rem_by_zero,
1674        panic_const_rem_overflow,
1675        panic_const_shl_overflow,
1676        panic_const_shr_overflow,
1677        panic_const_sub_overflow,
1678        panic_display,
1679        panic_fmt,
1680        panic_handler,
1681        panic_impl,
1682        panic_implementation,
1683        panic_in_cleanup,
1684        panic_info,
1685        panic_invalid_enum_construction,
1686        panic_location,
1687        panic_misaligned_pointer_dereference,
1688        panic_nounwind,
1689        panic_null_pointer_dereference,
1690        panic_runtime,
1691        panic_str_2015,
1692        panic_unwind,
1693        panicking,
1694        param_attrs,
1695        parent_label,
1696        partial_cmp,
1697        partial_ord,
1698        passes,
1699        pat,
1700        pat_param,
1701        patchable_function_entry,
1702        path,
1703        path_main_separator,
1704        path_to_pathbuf,
1705        pathbuf_as_path,
1706        pattern_complexity_limit,
1707        pattern_parentheses,
1708        pattern_type,
1709        pattern_type_range_trait,
1710        pattern_types,
1711        permissions_from_mode,
1712        phantom_data,
1713        phase,
1714        pic,
1715        pie,
1716        pin,
1717        pin_ergonomics,
1718        pin_macro,
1719        pin_v2,
1720        platform_intrinsics,
1721        plugin,
1722        plugin_registrar,
1723        plugins,
1724        pointee,
1725        pointee_sized,
1726        pointee_trait,
1727        pointer,
1728        poll,
1729        poll_next,
1730        position,
1731        post_cleanup: "post-cleanup",
1732        post_dash_lto: "post-lto",
1733        postfix_match,
1734        powerpc,
1735        powerpc64,
1736        powerpc_target_feature,
1737        powf16,
1738        powf32,
1739        powf64,
1740        powf128,
1741        powif16,
1742        powif32,
1743        powif64,
1744        powif128,
1745        pre_dash_lto: "pre-lto",
1746        precise_capturing,
1747        precise_capturing_in_traits,
1748        precise_pointer_size_matching,
1749        precision,
1750        pref_align_of,
1751        prefetch_read_data,
1752        prefetch_read_instruction,
1753        prefetch_write_data,
1754        prefetch_write_instruction,
1755        prefix_nops,
1756        preg,
1757        prelude,
1758        prelude_import,
1759        preserves_flags,
1760        prfchw_target_feature,
1761        print_macro,
1762        println_macro,
1763        proc_dash_macro: "proc-macro",
1764        proc_macro,
1765        proc_macro_attribute,
1766        proc_macro_derive,
1767        proc_macro_expr,
1768        proc_macro_gen,
1769        proc_macro_hygiene,
1770        proc_macro_internals,
1771        proc_macro_mod,
1772        proc_macro_non_items,
1773        proc_macro_path_invoc,
1774        process_abort,
1775        process_exit,
1776        profiler_builtins,
1777        profiler_runtime,
1778        ptr,
1779        ptr_cast,
1780        ptr_cast_const,
1781        ptr_cast_mut,
1782        ptr_const_is_null,
1783        ptr_copy,
1784        ptr_copy_nonoverlapping,
1785        ptr_eq,
1786        ptr_from_ref,
1787        ptr_guaranteed_cmp,
1788        ptr_is_null,
1789        ptr_mask,
1790        ptr_metadata,
1791        ptr_null,
1792        ptr_null_mut,
1793        ptr_offset_from,
1794        ptr_offset_from_unsigned,
1795        ptr_read,
1796        ptr_read_unaligned,
1797        ptr_read_volatile,
1798        ptr_replace,
1799        ptr_slice_from_raw_parts,
1800        ptr_slice_from_raw_parts_mut,
1801        ptr_swap,
1802        ptr_swap_nonoverlapping,
1803        ptr_without_provenance,
1804        ptr_without_provenance_mut,
1805        ptr_write,
1806        ptr_write_bytes,
1807        ptr_write_unaligned,
1808        ptr_write_volatile,
1809        pub_macro_rules,
1810        pub_restricted,
1811        public,
1812        pure,
1813        pushpop_unsafe,
1814        qreg,
1815        qreg_low4,
1816        qreg_low8,
1817        quad_precision_float,
1818        question_mark,
1819        quote,
1820        range_inclusive_new,
1821        range_step,
1822        raw_dash_dylib: "raw-dylib",
1823        raw_dylib,
1824        raw_dylib_elf,
1825        raw_eq,
1826        raw_identifiers,
1827        raw_ref_op,
1828        re_rebalance_coherence,
1829        read_enum,
1830        read_enum_variant,
1831        read_enum_variant_arg,
1832        read_struct,
1833        read_struct_field,
1834        read_via_copy,
1835        readonly,
1836        realloc,
1837        realtime,
1838        reason,
1839        reborrow,
1840        receiver,
1841        receiver_target,
1842        recursion_limit,
1843        reexport_test_harness_main,
1844        ref_pat_eat_one_layer_2024,
1845        ref_pat_eat_one_layer_2024_structural,
1846        ref_pat_everywhere,
1847        ref_unwind_safe_trait,
1848        reference,
1849        reflect,
1850        reg,
1851        reg16,
1852        reg32,
1853        reg64,
1854        reg_abcd,
1855        reg_addr,
1856        reg_byte,
1857        reg_data,
1858        reg_iw,
1859        reg_nonzero,
1860        reg_pair,
1861        reg_ptr,
1862        reg_upper,
1863        register_attr,
1864        register_tool,
1865        relaxed_adts,
1866        relaxed_struct_unsize,
1867        relocation_model,
1868        rem,
1869        rem_assign,
1870        repr,
1871        repr128,
1872        repr_align,
1873        repr_align_enum,
1874        repr_packed,
1875        repr_simd,
1876        repr_transparent,
1877        require,
1878        reserve_x18: "reserve-x18",
1879        residual,
1880        result,
1881        result_ffi_guarantees,
1882        result_ok_method,
1883        resume,
1884        return_position_impl_trait_in_trait,
1885        return_type_notation,
1886        riscv32,
1887        riscv64,
1888        riscv_target_feature,
1889        rlib,
1890        ropi,
1891        ropi_rwpi: "ropi-rwpi",
1892        rotate_left,
1893        rotate_right,
1894        round_ties_even_f16,
1895        round_ties_even_f32,
1896        round_ties_even_f64,
1897        round_ties_even_f128,
1898        roundf16,
1899        roundf32,
1900        roundf64,
1901        roundf128,
1902        rt,
1903        rtm_target_feature,
1904        runtime,
1905        rust,
1906        rust_2015,
1907        rust_2018,
1908        rust_2018_preview,
1909        rust_2021,
1910        rust_2024,
1911        rust_analyzer,
1912        rust_begin_unwind,
1913        rust_cold_cc,
1914        rust_eh_catch_typeinfo,
1915        rust_eh_personality,
1916        rust_future,
1917        rust_logo,
1918        rust_out,
1919        rustc,
1920        rustc_abi,
1921        // FIXME(#82232, #143834): temporary name to mitigate `#[align]` nameres ambiguity
1922        rustc_align,
1923        rustc_align_static,
1924        rustc_allocator,
1925        rustc_allocator_zeroed,
1926        rustc_allocator_zeroed_variant,
1927        rustc_allow_const_fn_unstable,
1928        rustc_allow_incoherent_impl,
1929        rustc_allowed_through_unstable_modules,
1930        rustc_as_ptr,
1931        rustc_attrs,
1932        rustc_autodiff,
1933        rustc_builtin_macro,
1934        rustc_capture_analysis,
1935        rustc_clean,
1936        rustc_coherence_is_core,
1937        rustc_coinductive,
1938        rustc_confusables,
1939        rustc_const_stable,
1940        rustc_const_stable_indirect,
1941        rustc_const_unstable,
1942        rustc_conversion_suggestion,
1943        rustc_deallocator,
1944        rustc_def_path,
1945        rustc_default_body_unstable,
1946        rustc_delayed_bug_from_inside_query,
1947        rustc_deny_explicit_impl,
1948        rustc_deprecated_safe_2024,
1949        rustc_diagnostic_item,
1950        rustc_diagnostic_macros,
1951        rustc_dirty,
1952        rustc_do_not_const_check,
1953        rustc_do_not_implement_via_object,
1954        rustc_doc_primitive,
1955        rustc_driver,
1956        rustc_dummy,
1957        rustc_dump_def_parents,
1958        rustc_dump_item_bounds,
1959        rustc_dump_predicates,
1960        rustc_dump_user_args,
1961        rustc_dump_vtable,
1962        rustc_effective_visibility,
1963        rustc_eii_foreign_item,
1964        rustc_evaluate_where_clauses,
1965        rustc_expected_cgu_reuse,
1966        rustc_force_inline,
1967        rustc_has_incoherent_inherent_impls,
1968        rustc_hidden_type_of_opaques,
1969        rustc_if_this_changed,
1970        rustc_inherit_overflow_checks,
1971        rustc_insignificant_dtor,
1972        rustc_intrinsic,
1973        rustc_intrinsic_const_stable_indirect,
1974        rustc_layout,
1975        rustc_layout_scalar_valid_range_end,
1976        rustc_layout_scalar_valid_range_start,
1977        rustc_legacy_const_generics,
1978        rustc_lint_diagnostics,
1979        rustc_lint_opt_deny_field_access,
1980        rustc_lint_opt_ty,
1981        rustc_lint_query_instability,
1982        rustc_lint_untracked_query_information,
1983        rustc_macro_transparency,
1984        rustc_main,
1985        rustc_mir,
1986        rustc_must_implement_one_of,
1987        rustc_never_returns_null_ptr,
1988        rustc_never_type_options,
1989        rustc_no_implicit_autorefs,
1990        rustc_no_implicit_bounds,
1991        rustc_no_mir_inline,
1992        rustc_nonnull_optimization_guaranteed,
1993        rustc_nounwind,
1994        rustc_objc_class,
1995        rustc_objc_selector,
1996        rustc_object_lifetime_default,
1997        rustc_offload_kernel,
1998        rustc_on_unimplemented,
1999        rustc_outlives,
2000        rustc_paren_sugar,
2001        rustc_partition_codegened,
2002        rustc_partition_reused,
2003        rustc_pass_by_value,
2004        rustc_pass_indirectly_in_non_rustic_abis,
2005        rustc_peek,
2006        rustc_peek_liveness,
2007        rustc_peek_maybe_init,
2008        rustc_peek_maybe_uninit,
2009        rustc_preserve_ub_checks,
2010        rustc_private,
2011        rustc_proc_macro_decls,
2012        rustc_promotable,
2013        rustc_pub_transparent,
2014        rustc_reallocator,
2015        rustc_regions,
2016        rustc_reservation_impl,
2017        rustc_scalable_vector,
2018        rustc_serialize,
2019        rustc_should_not_be_called_on_const_items,
2020        rustc_simd_monomorphize_lane_limit,
2021        rustc_skip_during_method_dispatch,
2022        rustc_specialization_trait,
2023        rustc_std_internal_symbol,
2024        rustc_strict_coherence,
2025        rustc_symbol_name,
2026        rustc_test_marker,
2027        rustc_then_this_would_need,
2028        rustc_trivial_field_reads,
2029        rustc_unsafe_specialization_marker,
2030        rustc_variance,
2031        rustc_variance_of_opaques,
2032        rustdoc,
2033        rustdoc_internals,
2034        rustdoc_missing_doc_code_examples,
2035        rustfmt,
2036        rvalue_static_promotion,
2037        rwpi,
2038        s,
2039        s390x,
2040        s390x_target_feature,
2041        s390x_target_feature_vector,
2042        safety,
2043        sanitize,
2044        sanitizer_cfi_generalize_pointers,
2045        sanitizer_cfi_normalize_integers,
2046        sanitizer_runtime,
2047        saturating_add,
2048        saturating_div,
2049        saturating_sub,
2050        sdylib,
2051        search_unbox,
2052        select_unpredictable,
2053        self_in_typedefs,
2054        self_struct_ctor,
2055        semiopaque,
2056        sha2,
2057        sha3,
2058        sha512_sm_x86,
2059        shadow_call_stack,
2060        shallow,
2061        shl,
2062        shl_assign,
2063        shorter_tail_lifetimes,
2064        should_panic,
2065        show,
2066        shr,
2067        shr_assign,
2068        sig_dfl,
2069        sig_ign,
2070        signed,
2071        simd,
2072        simd_add,
2073        simd_and,
2074        simd_arith_offset,
2075        simd_as,
2076        simd_bitmask,
2077        simd_bitreverse,
2078        simd_bswap,
2079        simd_cast,
2080        simd_cast_ptr,
2081        simd_ceil,
2082        simd_ctlz,
2083        simd_ctpop,
2084        simd_cttz,
2085        simd_div,
2086        simd_eq,
2087        simd_expose_provenance,
2088        simd_extract,
2089        simd_extract_dyn,
2090        simd_fabs,
2091        simd_fcos,
2092        simd_fexp,
2093        simd_fexp2,
2094        simd_ffi,
2095        simd_flog,
2096        simd_flog2,
2097        simd_flog10,
2098        simd_floor,
2099        simd_fma,
2100        simd_fmax,
2101        simd_fmin,
2102        simd_fsin,
2103        simd_fsqrt,
2104        simd_funnel_shl,
2105        simd_funnel_shr,
2106        simd_gather,
2107        simd_ge,
2108        simd_gt,
2109        simd_insert,
2110        simd_insert_dyn,
2111        simd_le,
2112        simd_lt,
2113        simd_masked_load,
2114        simd_masked_store,
2115        simd_mul,
2116        simd_ne,
2117        simd_neg,
2118        simd_or,
2119        simd_reduce_add_ordered,
2120        simd_reduce_add_unordered,
2121        simd_reduce_all,
2122        simd_reduce_and,
2123        simd_reduce_any,
2124        simd_reduce_max,
2125        simd_reduce_min,
2126        simd_reduce_mul_ordered,
2127        simd_reduce_mul_unordered,
2128        simd_reduce_or,
2129        simd_reduce_xor,
2130        simd_relaxed_fma,
2131        simd_rem,
2132        simd_round,
2133        simd_round_ties_even,
2134        simd_saturating_add,
2135        simd_saturating_sub,
2136        simd_scatter,
2137        simd_select,
2138        simd_select_bitmask,
2139        simd_shl,
2140        simd_shr,
2141        simd_shuffle,
2142        simd_shuffle_const_generic,
2143        simd_sub,
2144        simd_trunc,
2145        simd_with_exposed_provenance,
2146        simd_xor,
2147        since,
2148        sinf16,
2149        sinf32,
2150        sinf64,
2151        sinf128,
2152        size,
2153        size_of,
2154        size_of_val,
2155        sized,
2156        sized_hierarchy,
2157        skip,
2158        slice,
2159        slice_from_raw_parts,
2160        slice_from_raw_parts_mut,
2161        slice_from_ref,
2162        slice_get_unchecked,
2163        slice_into_vec,
2164        slice_iter,
2165        slice_len_fn,
2166        slice_patterns,
2167        slicing_syntax,
2168        soft,
2169        sparc,
2170        sparc64,
2171        sparc_target_feature,
2172        spe_acc,
2173        specialization,
2174        speed,
2175        spirv,
2176        spotlight,
2177        sqrtf16,
2178        sqrtf32,
2179        sqrtf64,
2180        sqrtf128,
2181        sreg,
2182        sreg_low16,
2183        sse,
2184        sse2,
2185        sse4a_target_feature,
2186        stable,
2187        staged_api,
2188        start,
2189        state,
2190        static_align,
2191        static_in_const,
2192        static_nobundle,
2193        static_recursion,
2194        staticlib,
2195        std,
2196        std_lib_injection,
2197        std_panic,
2198        std_panic_2015_macro,
2199        std_panic_macro,
2200        stmt,
2201        stmt_expr_attributes,
2202        stop_after_dataflow,
2203        store,
2204        str,
2205        str_chars,
2206        str_ends_with,
2207        str_from_utf8,
2208        str_from_utf8_mut,
2209        str_from_utf8_unchecked,
2210        str_from_utf8_unchecked_mut,
2211        str_inherent_from_utf8,
2212        str_inherent_from_utf8_mut,
2213        str_inherent_from_utf8_unchecked,
2214        str_inherent_from_utf8_unchecked_mut,
2215        str_len,
2216        str_split_whitespace,
2217        str_starts_with,
2218        str_trim,
2219        str_trim_end,
2220        str_trim_start,
2221        strict_provenance_lints,
2222        string_as_mut_str,
2223        string_as_str,
2224        string_deref_patterns,
2225        string_from_utf8,
2226        string_insert_str,
2227        string_new,
2228        string_push_str,
2229        stringify,
2230        struct_field_attributes,
2231        struct_inherit,
2232        struct_variant,
2233        structural_match,
2234        structural_peq,
2235        sub,
2236        sub_assign,
2237        sub_with_overflow,
2238        suggestion,
2239        super_let,
2240        supertrait_item_shadowing,
2241        sym,
2242        sync,
2243        synthetic,
2244        sys_mutex_lock,
2245        sys_mutex_try_lock,
2246        sys_mutex_unlock,
2247        t32,
2248        target,
2249        target_abi,
2250        target_arch,
2251        target_endian,
2252        target_env,
2253        target_family,
2254        target_feature,
2255        target_feature_11,
2256        target_feature_inline_always,
2257        target_has_atomic,
2258        target_has_atomic_equal_alignment,
2259        target_has_atomic_load_store,
2260        target_has_reliable_f16,
2261        target_has_reliable_f16_math,
2262        target_has_reliable_f128,
2263        target_has_reliable_f128_math,
2264        target_os,
2265        target_pointer_width,
2266        target_thread_local,
2267        target_vendor,
2268        tbm_target_feature,
2269        termination,
2270        termination_trait,
2271        termination_trait_test,
2272        test,
2273        test_2018_feature,
2274        test_accepted_feature,
2275        test_case,
2276        test_removed_feature,
2277        test_runner,
2278        test_unstable_lint,
2279        thread,
2280        thread_local,
2281        thread_local_macro,
2282        three_way_compare,
2283        thumb2,
2284        thumb_mode: "thumb-mode",
2285        tmm_reg,
2286        to_owned_method,
2287        to_string,
2288        to_string_method,
2289        to_vec,
2290        todo_macro,
2291        tool_attributes,
2292        tool_lints,
2293        trace_macros,
2294        track_caller,
2295        trait_alias,
2296        trait_upcasting,
2297        transmute,
2298        transmute_generic_consts,
2299        transmute_opts,
2300        transmute_trait,
2301        transmute_unchecked,
2302        transparent,
2303        transparent_enums,
2304        transparent_unions,
2305        trivial_bounds,
2306        trivial_clone,
2307        truncf16,
2308        truncf32,
2309        truncf64,
2310        truncf128,
2311        try_blocks,
2312        try_blocks_heterogeneous,
2313        try_capture,
2314        try_from,
2315        try_from_fn,
2316        try_into,
2317        try_trait_v2,
2318        try_trait_v2_residual,
2319        try_update,
2320        tt,
2321        tuple,
2322        tuple_indexing,
2323        tuple_trait,
2324        two_phase,
2325        ty,
2326        type_alias_enum_variants,
2327        type_alias_impl_trait,
2328        type_ascribe,
2329        type_ascription,
2330        type_changing_struct_update,
2331        type_const,
2332        type_id,
2333        type_id_eq,
2334        type_info,
2335        type_ir,
2336        type_ir_infer_ctxt_like,
2337        type_ir_inherent,
2338        type_ir_interner,
2339        type_length_limit,
2340        type_macros,
2341        type_name,
2342        type_of,
2343        type_privacy_lints,
2344        typed_swap_nonoverlapping,
2345        u8,
2346        u8_legacy_const_max,
2347        u8_legacy_const_min,
2348        u8_legacy_fn_max_value,
2349        u8_legacy_fn_min_value,
2350        u8_legacy_mod,
2351        u16,
2352        u16_legacy_const_max,
2353        u16_legacy_const_min,
2354        u16_legacy_fn_max_value,
2355        u16_legacy_fn_min_value,
2356        u16_legacy_mod,
2357        u32,
2358        u32_legacy_const_max,
2359        u32_legacy_const_min,
2360        u32_legacy_fn_max_value,
2361        u32_legacy_fn_min_value,
2362        u32_legacy_mod,
2363        u64,
2364        u64_legacy_const_max,
2365        u64_legacy_const_min,
2366        u64_legacy_fn_max_value,
2367        u64_legacy_fn_min_value,
2368        u64_legacy_mod,
2369        u128,
2370        u128_legacy_const_max,
2371        u128_legacy_const_min,
2372        u128_legacy_fn_max_value,
2373        u128_legacy_fn_min_value,
2374        u128_legacy_mod,
2375        ub_checks,
2376        unaligned_volatile_load,
2377        unaligned_volatile_store,
2378        unboxed_closures,
2379        unchecked_add,
2380        unchecked_div,
2381        unchecked_funnel_shl,
2382        unchecked_funnel_shr,
2383        unchecked_mul,
2384        unchecked_rem,
2385        unchecked_shl,
2386        unchecked_shr,
2387        unchecked_sub,
2388        undecorated,
2389        underscore_const_names,
2390        underscore_imports,
2391        underscore_lifetimes,
2392        uniform_paths,
2393        unimplemented_macro,
2394        unit,
2395        universal_impl_trait,
2396        unix,
2397        unlikely,
2398        unmarked_api,
2399        unnamed_fields,
2400        unpin,
2401        unqualified_local_imports,
2402        unreachable,
2403        unreachable_2015,
2404        unreachable_2015_macro,
2405        unreachable_2021,
2406        unreachable_code,
2407        unreachable_display,
2408        unreachable_macro,
2409        unrestricted_attribute_tokens,
2410        unsafe_attributes,
2411        unsafe_binders,
2412        unsafe_block_in_unsafe_fn,
2413        unsafe_cell,
2414        unsafe_cell_raw_get,
2415        unsafe_eii,
2416        unsafe_extern_blocks,
2417        unsafe_fields,
2418        unsafe_no_drop_flag,
2419        unsafe_pinned,
2420        unsafe_unpin,
2421        unsize,
2422        unsized_const_param_ty,
2423        unsized_const_params,
2424        unsized_fn_params,
2425        unsized_locals,
2426        unsized_tuple_coercion,
2427        unstable,
2428        unstable_feature_bound,
2429        unstable_location_reason_default: "this crate is being loaded from the sysroot, an \
2430                          unstable location; did you mean to load this crate \
2431                          from crates.io via `Cargo.toml` instead?",
2432        untagged_unions,
2433        unused_imports,
2434        unwind,
2435        unwind_attributes,
2436        unwind_safe_trait,
2437        unwrap,
2438        unwrap_binder,
2439        unwrap_or,
2440        update,
2441        use_cloned,
2442        use_extern_macros,
2443        use_nested_groups,
2444        used,
2445        used_with_arg,
2446        using,
2447        usize,
2448        usize_legacy_const_max,
2449        usize_legacy_const_min,
2450        usize_legacy_fn_max_value,
2451        usize_legacy_fn_min_value,
2452        usize_legacy_mod,
2453        v1,
2454        v8plus,
2455        va_arg,
2456        va_copy,
2457        va_end,
2458        va_list,
2459        va_start,
2460        val,
2461        validity,
2462        value,
2463        values,
2464        var,
2465        variant_count,
2466        vec,
2467        vec_as_mut_slice,
2468        vec_as_slice,
2469        vec_from_elem,
2470        vec_is_empty,
2471        vec_macro,
2472        vec_new,
2473        vec_pop,
2474        vec_reserve,
2475        vec_with_capacity,
2476        vecdeque_iter,
2477        vecdeque_reserve,
2478        vector,
2479        verbatim,
2480        version,
2481        vfp2,
2482        vis,
2483        visible_private_types,
2484        volatile,
2485        volatile_copy_memory,
2486        volatile_copy_nonoverlapping_memory,
2487        volatile_load,
2488        volatile_set_memory,
2489        volatile_store,
2490        vreg,
2491        vreg_low16,
2492        vsreg,
2493        vsx,
2494        vtable_align,
2495        vtable_for,
2496        vtable_size,
2497        warn,
2498        wasip2,
2499        wasm32,
2500        wasm64,
2501        wasm_abi,
2502        wasm_import_module,
2503        wasm_target_feature,
2504        weak,
2505        weak_odr,
2506        where_clause_attrs,
2507        while_let,
2508        whole_dash_archive: "whole-archive",
2509        width,
2510        windows,
2511        windows_subsystem,
2512        with_negative_coherence,
2513        wrap_binder,
2514        wrapping_add,
2515        wrapping_div,
2516        wrapping_mul,
2517        wrapping_rem,
2518        wrapping_rem_euclid,
2519        wrapping_sub,
2520        wreg,
2521        write_bytes,
2522        write_fmt,
2523        write_macro,
2524        write_str,
2525        write_via_move,
2526        writeln_macro,
2527        x86,
2528        x86_64,
2529        x86_amx_intrinsics,
2530        x87_reg,
2531        x87_target_feature,
2532        xer,
2533        xmm_reg,
2534        xop_target_feature,
2535        xtensa,
2536        yeet_desugar_details,
2537        yeet_expr,
2538        yes,
2539        yield_expr,
2540        ymm_reg,
2541        yreg,
2542        zca,
2543        zfh,
2544        zfhmin,
2545        zmm_reg,
2546        ztso,
2547        // tidy-alphabetical-end
2548    }
2549}
2550
2551/// Symbols for crates that are part of the stable standard library: `std`, `core`, `alloc`, and
2552/// `proc_macro`.
2553pub const STDLIB_STABLE_CRATES: &[Symbol] = &[sym::std, sym::core, sym::alloc, sym::proc_macro];
2554
2555#[derive(#[automatically_derived]
impl ::core::marker::Copy for Ident { }Copy, #[automatically_derived]
impl ::core::clone::Clone for Ident {
    #[inline]
    fn clone(&self) -> Ident {
        let _: ::core::clone::AssertParamIsClone<Symbol>;
        let _: ::core::clone::AssertParamIsClone<Span>;
        *self
    }
}Clone, #[automatically_derived]
impl ::core::cmp::Eq for Ident {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_receiver_is_total_eq(&self) -> () {
        let _: ::core::cmp::AssertParamIsEq<Symbol>;
        let _: ::core::cmp::AssertParamIsEq<Span>;
    }
}Eq, const _: () =
    {
        impl<__CTX> ::rustc_data_structures::stable_hasher::HashStable<__CTX>
            for Ident where __CTX: crate::HashStableContext {
            #[inline]
            fn hash_stable(&self, __hcx: &mut __CTX,
                __hasher:
                    &mut ::rustc_data_structures::stable_hasher::StableHasher) {
                match *self {
                    Ident { name: ref __binding_0, span: ref __binding_1 } => {
                        { __binding_0.hash_stable(__hcx, __hasher); }
                        { __binding_1.hash_stable(__hcx, __hasher); }
                    }
                }
            }
        }
    };HashStable_Generic, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for Ident {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    Ident { name: ref __binding_0, span: ref __binding_1 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for Ident {
            fn decode(__decoder: &mut __D) -> Self {
                Ident {
                    name: ::rustc_serialize::Decodable::decode(__decoder),
                    span: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable)]
2556pub struct Ident {
2557    /// `name` should never be the empty symbol. If you are considering that,
2558    /// you are probably conflating "empty identifier with "no identifier" and
2559    /// you should use `Option<Ident>` instead.
2560    /// Trying to construct an `Ident` with an empty name will trigger debug assertions.
2561    pub name: Symbol,
2562    pub span: Span,
2563}
2564
2565impl Ident {
2566    #[inline]
2567    /// Constructs a new identifier from a symbol and a span.
2568    pub fn new(name: Symbol, span: Span) -> Ident {
2569        if true {
    match (&name, &sym::empty) {
        (left_val, right_val) => {
            if *left_val == *right_val {
                let kind = ::core::panicking::AssertKind::Ne;
                ::core::panicking::assert_failed(kind, &*left_val,
                    &*right_val, ::core::option::Option::None);
            }
        }
    };
};debug_assert_ne!(name, sym::empty);
2570        Ident { name, span }
2571    }
2572
2573    /// Constructs a new identifier with a dummy span.
2574    #[inline]
2575    pub fn with_dummy_span(name: Symbol) -> Ident {
2576        Ident::new(name, DUMMY_SP)
2577    }
2578
2579    // For dummy identifiers that are never used and absolutely must be
2580    // present. Note that this does *not* use the empty symbol; `sym::dummy`
2581    // makes it clear that it's intended as a dummy value, and is more likely
2582    // to be detected if it accidentally does get used.
2583    #[inline]
2584    pub fn dummy() -> Ident {
2585        Ident::with_dummy_span(sym::dummy)
2586    }
2587
2588    /// Maps a string to an identifier with a dummy span.
2589    pub fn from_str(string: &str) -> Ident {
2590        Ident::with_dummy_span(Symbol::intern(string))
2591    }
2592
2593    /// Maps a string and a span to an identifier.
2594    pub fn from_str_and_span(string: &str, span: Span) -> Ident {
2595        Ident::new(Symbol::intern(string), span)
2596    }
2597
2598    /// Replaces `lo` and `hi` with those from `span`, but keep hygiene context.
2599    pub fn with_span_pos(self, span: Span) -> Ident {
2600        Ident::new(self.name, span.with_ctxt(self.span.ctxt()))
2601    }
2602
2603    /// Creates a new ident with the same span and name with leading quote removed, if any.
2604    /// Calling it on a `'` ident will return an empty ident, which triggers debug assertions.
2605    pub fn without_first_quote(self) -> Ident {
2606        self.as_str()
2607            .strip_prefix('\'')
2608            .map_or(self, |name| Ident::new(Symbol::intern(name), self.span))
2609    }
2610
2611    /// "Normalize" ident for use in comparisons using "item hygiene".
2612    /// Identifiers with same string value become same if they came from the same macro 2.0 macro
2613    /// (e.g., `macro` item, but not `macro_rules` item) and stay different if they came from
2614    /// different macro 2.0 macros.
2615    /// Technically, this operation strips all non-opaque marks from ident's syntactic context.
2616    pub fn normalize_to_macros_2_0(self) -> Ident {
2617        Ident::new(self.name, self.span.normalize_to_macros_2_0())
2618    }
2619
2620    /// "Normalize" ident for use in comparisons using "local variable hygiene".
2621    /// Identifiers with same string value become same if they came from the same non-transparent
2622    /// macro (e.g., `macro` or `macro_rules!` items) and stay different if they came from different
2623    /// non-transparent macros.
2624    /// Technically, this operation strips all transparent marks from ident's syntactic context.
2625    #[inline]
2626    pub fn normalize_to_macro_rules(self) -> Ident {
2627        Ident::new(self.name, self.span.normalize_to_macro_rules())
2628    }
2629
2630    /// Access the underlying string. This is a slowish operation because it
2631    /// requires locking the symbol interner.
2632    ///
2633    /// Note that the lifetime of the return value is a lie. See
2634    /// `Symbol::as_str()` for details.
2635    pub fn as_str(&self) -> &str {
2636        self.name.as_str()
2637    }
2638}
2639
2640impl PartialEq for Ident {
2641    #[inline]
2642    fn eq(&self, rhs: &Self) -> bool {
2643        self.name == rhs.name && self.span.eq_ctxt(rhs.span)
2644    }
2645}
2646
2647impl Hash for Ident {
2648    fn hash<H: Hasher>(&self, state: &mut H) {
2649        self.name.hash(state);
2650        self.span.ctxt().hash(state);
2651    }
2652}
2653
2654impl fmt::Debug for Ident {
2655    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2656        fmt::Display::fmt(self, f)?;
2657        fmt::Debug::fmt(&self.span.ctxt(), f)
2658    }
2659}
2660
2661/// This implementation is supposed to be used in error messages, so it's expected to be identical
2662/// to printing the original identifier token written in source code (`token_to_string`),
2663/// except that AST identifiers don't keep the rawness flag, so we have to guess it.
2664impl fmt::Display for Ident {
2665    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2666        fmt::Display::fmt(&IdentPrinter::new(self.name, self.guess_print_mode(), None), f)
2667    }
2668}
2669
2670pub enum IdentPrintMode {
2671    Normal,
2672    RawIdent,
2673    RawLifetime,
2674}
2675
2676/// The most general type to print identifiers.
2677///
2678/// AST pretty-printer is used as a fallback for turning AST structures into token streams for
2679/// proc macros. Additionally, proc macros may stringify their input and expect it survive the
2680/// stringification (especially true for proc macro derives written between Rust 1.15 and 1.30).
2681/// So we need to somehow pretty-print `$crate` in a way preserving at least some of its
2682/// hygiene data, most importantly name of the crate it refers to.
2683/// As a result we print `$crate` as `crate` if it refers to the local crate
2684/// and as `::other_crate_name` if it refers to some other crate.
2685/// Note, that this is only done if the ident token is printed from inside of AST pretty-printing,
2686/// but not otherwise. Pretty-printing is the only way for proc macros to discover token contents,
2687/// so we should not perform this lossy conversion if the top level call to the pretty-printer was
2688/// done for a token stream or a single token.
2689pub struct IdentPrinter {
2690    symbol: Symbol,
2691    mode: IdentPrintMode,
2692    /// Span used for retrieving the crate name to which `$crate` refers to,
2693    /// if this field is `None` then the `$crate` conversion doesn't happen.
2694    convert_dollar_crate: Option<Span>,
2695}
2696
2697impl IdentPrinter {
2698    /// The most general `IdentPrinter` constructor. Do not use this.
2699    pub fn new(
2700        symbol: Symbol,
2701        mode: IdentPrintMode,
2702        convert_dollar_crate: Option<Span>,
2703    ) -> IdentPrinter {
2704        IdentPrinter { symbol, mode, convert_dollar_crate }
2705    }
2706
2707    /// This implementation is supposed to be used when printing identifiers
2708    /// as a part of pretty-printing for larger AST pieces.
2709    /// Do not use this either.
2710    pub fn for_ast_ident(ident: Ident, mode: IdentPrintMode) -> IdentPrinter {
2711        IdentPrinter::new(ident.name, mode, Some(ident.span))
2712    }
2713}
2714
2715impl fmt::Display for IdentPrinter {
2716    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2717        let s = match self.mode {
2718            IdentPrintMode::Normal
2719                if self.symbol == kw::DollarCrate
2720                    && let Some(span) = self.convert_dollar_crate =>
2721            {
2722                let converted = span.ctxt().dollar_crate_name();
2723                if !converted.is_path_segment_keyword() {
2724                    f.write_str("::")?;
2725                }
2726                converted
2727            }
2728            IdentPrintMode::Normal => self.symbol,
2729            IdentPrintMode::RawIdent => {
2730                f.write_str("r#")?;
2731                self.symbol
2732            }
2733            IdentPrintMode::RawLifetime => {
2734                f.write_str("'r#")?;
2735                let s = self
2736                    .symbol
2737                    .as_str()
2738                    .strip_prefix("'")
2739                    .expect("only lifetime idents should be passed with RawLifetime mode");
2740                Symbol::intern(s)
2741            }
2742        };
2743        s.fmt(f)
2744    }
2745}
2746
2747/// An newtype around `Ident` that calls [Ident::normalize_to_macro_rules] on
2748/// construction for "local variable hygiene" comparisons.
2749///
2750/// Use this type when you need to compare identifiers according to macro_rules hygiene.
2751/// This ensures compile-time safety and avoids manual normalization calls.
2752#[derive(#[automatically_derived]
impl ::core::marker::Copy for MacroRulesNormalizedIdent { }Copy, #[automatically_derived]
impl ::core::clone::Clone for MacroRulesNormalizedIdent {
    #[inline]
    fn clone(&self) -> MacroRulesNormalizedIdent {
        let _: ::core::clone::AssertParamIsClone<Ident>;
        *self
    }
}Clone, #[automatically_derived]
impl ::core::cmp::Eq for MacroRulesNormalizedIdent {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_receiver_is_total_eq(&self) -> () {
        let _: ::core::cmp::AssertParamIsEq<Ident>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::PartialEq for MacroRulesNormalizedIdent {
    #[inline]
    fn eq(&self, other: &MacroRulesNormalizedIdent) -> bool {
        self.0 == other.0
    }
}PartialEq, #[automatically_derived]
impl ::core::hash::Hash for MacroRulesNormalizedIdent {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) -> () {
        ::core::hash::Hash::hash(&self.0, state)
    }
}Hash)]
2753pub struct MacroRulesNormalizedIdent(Ident);
2754
2755impl MacroRulesNormalizedIdent {
2756    #[inline]
2757    pub fn new(ident: Ident) -> Self {
2758        MacroRulesNormalizedIdent(ident.normalize_to_macro_rules())
2759    }
2760}
2761
2762impl fmt::Debug for MacroRulesNormalizedIdent {
2763    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2764        fmt::Debug::fmt(&self.0, f)
2765    }
2766}
2767
2768impl fmt::Display for MacroRulesNormalizedIdent {
2769    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2770        fmt::Display::fmt(&self.0, f)
2771    }
2772}
2773
2774/// An newtype around `Ident` that calls [Ident::normalize_to_macros_2_0] on
2775/// construction for "item hygiene" comparisons.
2776///
2777/// Identifiers with same string value become same if they came from the same macro 2.0 macro
2778/// (e.g., `macro` item, but not `macro_rules` item) and stay different if they came from
2779/// different macro 2.0 macros.
2780#[derive(#[automatically_derived]
impl ::core::marker::Copy for Macros20NormalizedIdent { }Copy, #[automatically_derived]
impl ::core::clone::Clone for Macros20NormalizedIdent {
    #[inline]
    fn clone(&self) -> Macros20NormalizedIdent {
        let _: ::core::clone::AssertParamIsClone<Ident>;
        *self
    }
}Clone, #[automatically_derived]
impl ::core::cmp::Eq for Macros20NormalizedIdent {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_receiver_is_total_eq(&self) -> () {
        let _: ::core::cmp::AssertParamIsEq<Ident>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::PartialEq for Macros20NormalizedIdent {
    #[inline]
    fn eq(&self, other: &Macros20NormalizedIdent) -> bool {
        self.0 == other.0
    }
}PartialEq, #[automatically_derived]
impl ::core::hash::Hash for Macros20NormalizedIdent {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) -> () {
        ::core::hash::Hash::hash(&self.0, state)
    }
}Hash)]
2781pub struct Macros20NormalizedIdent(pub Ident);
2782
2783impl Macros20NormalizedIdent {
2784    #[inline]
2785    pub fn new(ident: Ident) -> Self {
2786        Macros20NormalizedIdent(ident.normalize_to_macros_2_0())
2787    }
2788
2789    // dummy_span does not need to be normalized, so we can use `Ident` directly
2790    pub fn with_dummy_span(name: Symbol) -> Self {
2791        Macros20NormalizedIdent(Ident::with_dummy_span(name))
2792    }
2793}
2794
2795impl fmt::Debug for Macros20NormalizedIdent {
2796    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2797        fmt::Debug::fmt(&self.0, f)
2798    }
2799}
2800
2801impl fmt::Display for Macros20NormalizedIdent {
2802    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2803        fmt::Display::fmt(&self.0, f)
2804    }
2805}
2806
2807/// By impl Deref, we can access the wrapped Ident as if it were a normal Ident
2808/// such as `norm_ident.name` instead of `norm_ident.0.name`.
2809impl Deref for Macros20NormalizedIdent {
2810    type Target = Ident;
2811    fn deref(&self) -> &Self::Target {
2812        &self.0
2813    }
2814}
2815
2816/// An interned UTF-8 string.
2817///
2818/// Internally, a `Symbol` is implemented as an index, and all operations
2819/// (including hashing, equality, and ordering) operate on that index. The use
2820/// of `rustc_index::newtype_index!` means that `Option<Symbol>` only takes up 4 bytes,
2821/// because `rustc_index::newtype_index!` reserves the last 256 values for tagging purposes.
2822///
2823/// Note that `Symbol` cannot directly be a `rustc_index::newtype_index!` because it
2824/// implements `fmt::Debug`, `Encodable`, and `Decodable` in special ways.
2825#[derive(#[automatically_derived]
impl ::core::clone::Clone for Symbol {
    #[inline]
    fn clone(&self) -> Symbol {
        let _: ::core::clone::AssertParamIsClone<SymbolIndex>;
        *self
    }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for Symbol { }Copy, #[automatically_derived]
impl ::core::cmp::PartialEq for Symbol {
    #[inline]
    fn eq(&self, other: &Symbol) -> bool { self.0 == other.0 }
}PartialEq, #[automatically_derived]
impl ::core::cmp::Eq for Symbol {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_receiver_is_total_eq(&self) -> () {
        let _: ::core::cmp::AssertParamIsEq<SymbolIndex>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::PartialOrd for Symbol {
    #[inline]
    fn partial_cmp(&self, other: &Symbol)
        -> ::core::option::Option<::core::cmp::Ordering> {
        ::core::cmp::PartialOrd::partial_cmp(&self.0, &other.0)
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Ord for Symbol {
    #[inline]
    fn cmp(&self, other: &Symbol) -> ::core::cmp::Ordering {
        ::core::cmp::Ord::cmp(&self.0, &other.0)
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for Symbol {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) -> () {
        ::core::hash::Hash::hash(&self.0, state)
    }
}Hash)]
2826pub struct Symbol(SymbolIndex);
2827
2828// Used within both `Symbol` and `ByteSymbol`.
2829impl ::std::fmt::Debug for SymbolIndex {
    fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        fmt.write_fmt(format_args!("{0}", self.as_u32()))
    }
}rustc_index::newtype_index! {
2830    #[orderable]
2831    struct SymbolIndex {}
2832}
2833
2834impl Symbol {
2835    /// Avoid this except for things like deserialization of previously
2836    /// serialized symbols, and testing. Use `intern` instead.
2837    pub const fn new(n: u32) -> Self {
2838        Symbol(SymbolIndex::from_u32(n))
2839    }
2840
2841    /// Maps a string to its interned representation.
2842    #[rustc_diagnostic_item = "SymbolIntern"]
2843    pub fn intern(str: &str) -> Self {
2844        with_session_globals(|session_globals| session_globals.symbol_interner.intern_str(str))
2845    }
2846
2847    /// Access the underlying string. This is a slowish operation because it
2848    /// requires locking the symbol interner.
2849    ///
2850    /// Note that the lifetime of the return value is a lie. It's not the same
2851    /// as `&self`, but actually tied to the lifetime of the underlying
2852    /// interner. Interners are long-lived, and there are very few of them, and
2853    /// this function is typically used for short-lived things, so in practice
2854    /// it works out ok.
2855    pub fn as_str(&self) -> &str {
2856        with_session_globals(|session_globals| unsafe {
2857            std::mem::transmute::<&str, &str>(session_globals.symbol_interner.get_str(*self))
2858        })
2859    }
2860
2861    pub fn as_u32(self) -> u32 {
2862        self.0.as_u32()
2863    }
2864
2865    pub fn is_empty(self) -> bool {
2866        self == sym::empty
2867    }
2868
2869    /// This method is supposed to be used in error messages, so it's expected to be
2870    /// identical to printing the original identifier token written in source code
2871    /// (`token_to_string`, `Ident::to_string`), except that symbols don't keep the rawness flag
2872    /// or edition, so we have to guess the rawness using the global edition.
2873    pub fn to_ident_string(self) -> String {
2874        // Avoid creating an empty identifier, because that asserts in debug builds.
2875        if self == sym::empty { String::new() } else { Ident::with_dummy_span(self).to_string() }
2876    }
2877
2878    /// Checks if `self` is similar to any symbol in `candidates`.
2879    ///
2880    /// The returned boolean represents whether the candidate is the same symbol with a different
2881    /// casing.
2882    ///
2883    /// All the candidates are assumed to be lowercase.
2884    pub fn find_similar(
2885        self,
2886        candidates: &[Symbol],
2887    ) -> Option<(Symbol, /* is incorrect case */ bool)> {
2888        let lowercase = self.as_str().to_lowercase();
2889        let lowercase_sym = Symbol::intern(&lowercase);
2890        if candidates.contains(&lowercase_sym) {
2891            Some((lowercase_sym, true))
2892        } else if let Some(similar_sym) = find_best_match_for_name(candidates, self, None) {
2893            Some((similar_sym, false))
2894        } else {
2895            None
2896        }
2897    }
2898}
2899
2900impl fmt::Debug for Symbol {
2901    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2902        fmt::Debug::fmt(self.as_str(), f)
2903    }
2904}
2905
2906impl fmt::Display for Symbol {
2907    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2908        fmt::Display::fmt(self.as_str(), f)
2909    }
2910}
2911
2912impl<CTX> HashStable<CTX> for Symbol {
2913    #[inline]
2914    fn hash_stable(&self, hcx: &mut CTX, hasher: &mut StableHasher) {
2915        self.as_str().hash_stable(hcx, hasher);
2916    }
2917}
2918
2919impl<CTX> ToStableHashKey<CTX> for Symbol {
2920    type KeyType = String;
2921    #[inline]
2922    fn to_stable_hash_key(&self, _: &CTX) -> String {
2923        self.as_str().to_string()
2924    }
2925}
2926
2927impl StableCompare for Symbol {
2928    const CAN_USE_UNSTABLE_SORT: bool = true;
2929
2930    fn stable_cmp(&self, other: &Self) -> std::cmp::Ordering {
2931        self.as_str().cmp(other.as_str())
2932    }
2933}
2934
2935/// Like `Symbol`, but for byte strings. `ByteSymbol` is used less widely, so
2936/// it has fewer operations defined than `Symbol`.
2937#[derive(#[automatically_derived]
impl ::core::clone::Clone for ByteSymbol {
    #[inline]
    fn clone(&self) -> ByteSymbol {
        let _: ::core::clone::AssertParamIsClone<SymbolIndex>;
        *self
    }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for ByteSymbol { }Copy, #[automatically_derived]
impl ::core::cmp::PartialEq for ByteSymbol {
    #[inline]
    fn eq(&self, other: &ByteSymbol) -> bool { self.0 == other.0 }
}PartialEq, #[automatically_derived]
impl ::core::cmp::Eq for ByteSymbol {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_receiver_is_total_eq(&self) -> () {
        let _: ::core::cmp::AssertParamIsEq<SymbolIndex>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::PartialOrd for ByteSymbol {
    #[inline]
    fn partial_cmp(&self, other: &ByteSymbol)
        -> ::core::option::Option<::core::cmp::Ordering> {
        ::core::cmp::PartialOrd::partial_cmp(&self.0, &other.0)
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Ord for ByteSymbol {
    #[inline]
    fn cmp(&self, other: &ByteSymbol) -> ::core::cmp::Ordering {
        ::core::cmp::Ord::cmp(&self.0, &other.0)
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for ByteSymbol {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) -> () {
        ::core::hash::Hash::hash(&self.0, state)
    }
}Hash)]
2938pub struct ByteSymbol(SymbolIndex);
2939
2940impl ByteSymbol {
2941    /// Avoid this except for things like deserialization of previously
2942    /// serialized symbols, and testing. Use `intern` instead.
2943    pub const fn new(n: u32) -> Self {
2944        ByteSymbol(SymbolIndex::from_u32(n))
2945    }
2946
2947    /// Maps a string to its interned representation.
2948    pub fn intern(byte_str: &[u8]) -> Self {
2949        with_session_globals(|session_globals| {
2950            session_globals.symbol_interner.intern_byte_str(byte_str)
2951        })
2952    }
2953
2954    /// Like `Symbol::as_str`.
2955    pub fn as_byte_str(&self) -> &[u8] {
2956        with_session_globals(|session_globals| unsafe {
2957            std::mem::transmute::<&[u8], &[u8]>(session_globals.symbol_interner.get_byte_str(*self))
2958        })
2959    }
2960
2961    pub fn as_u32(self) -> u32 {
2962        self.0.as_u32()
2963    }
2964}
2965
2966impl fmt::Debug for ByteSymbol {
2967    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2968        fmt::Debug::fmt(self.as_byte_str(), f)
2969    }
2970}
2971
2972impl<CTX> HashStable<CTX> for ByteSymbol {
2973    #[inline]
2974    fn hash_stable(&self, hcx: &mut CTX, hasher: &mut StableHasher) {
2975        self.as_byte_str().hash_stable(hcx, hasher);
2976    }
2977}
2978
2979// Interner used for both `Symbol`s and `ByteSymbol`s. If a string and a byte
2980// string with identical contents (e.g. "foo" and b"foo") are both interned,
2981// only one copy will be stored and the resulting `Symbol` and `ByteSymbol`
2982// will have the same index.
2983pub(crate) struct Interner(Lock<InternerInner>);
2984
2985// The `&'static [u8]`s in this type actually point into the arena.
2986//
2987// This type is private to prevent accidentally constructing more than one
2988// `Interner` on the same thread, which makes it easy to mix up `Symbol`s
2989// between `Interner`s.
2990struct InternerInner {
2991    arena: DroplessArena,
2992    byte_strs: FxIndexSet<&'static [u8]>,
2993}
2994
2995impl Interner {
2996    // These arguments are `&str`, but because of the sharing, we are
2997    // effectively pre-interning all these strings for both `Symbol` and
2998    // `ByteSymbol`.
2999    fn prefill(init: &[&'static str], extra: &[&'static str]) -> Self {
3000        let byte_strs = FxIndexSet::from_iter(
3001            init.iter().copied().chain(extra.iter().copied()).map(|str| str.as_bytes()),
3002        );
3003
3004        // The order in which duplicates are reported is irrelevant.
3005        #[expect(rustc::potential_query_instability)]
3006        if byte_strs.len() != init.len() + extra.len() {
3007            {
    ::core::panicking::panic_fmt(format_args!("duplicate symbols in the rustc symbol list and the extra symbols added by the driver: {0:?}",
            FxHashSet::intersection(&init.iter().copied().collect(),
                    &extra.iter().copied().collect()).collect::<Vec<_>>()));
}panic!(
3008                "duplicate symbols in the rustc symbol list and the extra symbols added by the driver: {:?}",
3009                FxHashSet::intersection(
3010                    &init.iter().copied().collect(),
3011                    &extra.iter().copied().collect(),
3012                )
3013                .collect::<Vec<_>>()
3014            )
3015        }
3016
3017        Interner(Lock::new(InternerInner { arena: Default::default(), byte_strs }))
3018    }
3019
3020    fn intern_str(&self, str: &str) -> Symbol {
3021        Symbol::new(self.intern_inner(str.as_bytes()))
3022    }
3023
3024    fn intern_byte_str(&self, byte_str: &[u8]) -> ByteSymbol {
3025        ByteSymbol::new(self.intern_inner(byte_str))
3026    }
3027
3028    #[inline]
3029    fn intern_inner(&self, byte_str: &[u8]) -> u32 {
3030        let mut inner = self.0.lock();
3031        if let Some(idx) = inner.byte_strs.get_index_of(byte_str) {
3032            return idx as u32;
3033        }
3034
3035        let byte_str: &[u8] = inner.arena.alloc_slice(byte_str);
3036
3037        // SAFETY: we can extend the arena allocation to `'static` because we
3038        // only access these while the arena is still alive.
3039        let byte_str: &'static [u8] = unsafe { &*(byte_str as *const [u8]) };
3040
3041        // This second hash table lookup can be avoided by using `RawEntryMut`,
3042        // but this code path isn't hot enough for it to be worth it. See
3043        // #91445 for details.
3044        let (idx, is_new) = inner.byte_strs.insert_full(byte_str);
3045        if true {
    if !is_new { ::core::panicking::panic("assertion failed: is_new") };
};debug_assert!(is_new); // due to the get_index_of check above
3046
3047        idx as u32
3048    }
3049
3050    /// Get the symbol as a string.
3051    ///
3052    /// [`Symbol::as_str()`] should be used in preference to this function.
3053    fn get_str(&self, symbol: Symbol) -> &str {
3054        let byte_str = self.get_inner(symbol.0.as_usize());
3055        // SAFETY: known to be a UTF8 string because it's a `Symbol`.
3056        unsafe { str::from_utf8_unchecked(byte_str) }
3057    }
3058
3059    /// Get the symbol as a string.
3060    ///
3061    /// [`ByteSymbol::as_byte_str()`] should be used in preference to this function.
3062    fn get_byte_str(&self, symbol: ByteSymbol) -> &[u8] {
3063        self.get_inner(symbol.0.as_usize())
3064    }
3065
3066    fn get_inner(&self, index: usize) -> &[u8] {
3067        self.0.lock().byte_strs.get_index(index).unwrap()
3068    }
3069}
3070
3071// This module has a very short name because it's used a lot.
3072/// This module contains all the defined keyword `Symbol`s.
3073///
3074/// Given that `kw` is imported, use them like `kw::keyword_name`.
3075/// For example `kw::Loop` or `kw::Break`.
3076pub mod kw {
3077    pub use super::kw_generated::*;
3078}
3079
3080// This module has a very short name because it's used a lot.
3081/// This module contains all the defined non-keyword `Symbol`s.
3082///
3083/// Given that `sym` is imported, use them like `sym::symbol_name`.
3084/// For example `sym::rustfmt` or `sym::u8`.
3085pub mod sym {
3086    // Used from a macro in `librustc_feature/accepted.rs`
3087    use super::Symbol;
3088    pub use super::kw::MacroRules as macro_rules;
3089    #[doc(inline)]
3090    pub use super::sym_generated::*;
3091
3092    /// Get the symbol for an integer.
3093    ///
3094    /// The first few non-negative integers each have a static symbol and therefore
3095    /// are fast.
3096    pub fn integer<N: TryInto<usize> + Copy + itoa::Integer>(n: N) -> Symbol {
3097        if let Result::Ok(idx) = n.try_into() {
3098            if idx < 10 {
3099                return Symbol::new(super::SYMBOL_DIGITS_BASE + idx as u32);
3100            }
3101        }
3102        let mut buffer = itoa::Buffer::new();
3103        let printed = buffer.format(n);
3104        Symbol::intern(printed)
3105    }
3106}
3107
3108impl Symbol {
3109    fn is_special(self) -> bool {
3110        self <= kw::Underscore
3111    }
3112
3113    fn is_used_keyword_always(self) -> bool {
3114        self >= kw::As && self <= kw::While
3115    }
3116
3117    fn is_unused_keyword_always(self) -> bool {
3118        self >= kw::Abstract && self <= kw::Yield
3119    }
3120
3121    fn is_used_keyword_conditional(self, edition: impl FnOnce() -> Edition) -> bool {
3122        (self >= kw::Async && self <= kw::Dyn) && edition() >= Edition::Edition2018
3123    }
3124
3125    fn is_unused_keyword_conditional(self, edition: impl Copy + FnOnce() -> Edition) -> bool {
3126        self == kw::Gen && edition().at_least_rust_2024()
3127            || self == kw::Try && edition().at_least_rust_2018()
3128    }
3129
3130    pub fn is_reserved(self, edition: impl Copy + FnOnce() -> Edition) -> bool {
3131        self.is_special()
3132            || self.is_used_keyword_always()
3133            || self.is_unused_keyword_always()
3134            || self.is_used_keyword_conditional(edition)
3135            || self.is_unused_keyword_conditional(edition)
3136    }
3137
3138    pub fn is_weak(self) -> bool {
3139        self >= kw::Auto && self <= kw::Yeet
3140    }
3141
3142    /// A keyword or reserved identifier that can be used as a path segment.
3143    pub fn is_path_segment_keyword(self) -> bool {
3144        self == kw::Super
3145            || self == kw::SelfLower
3146            || self == kw::SelfUpper
3147            || self == kw::Crate
3148            || self == kw::PathRoot
3149            || self == kw::DollarCrate
3150    }
3151
3152    /// Returns `true` if the symbol is `true` or `false`.
3153    pub fn is_bool_lit(self) -> bool {
3154        self == kw::True || self == kw::False
3155    }
3156
3157    /// Returns `true` if this symbol can be a raw identifier.
3158    pub fn can_be_raw(self) -> bool {
3159        self != sym::empty && self != kw::Underscore && !self.is_path_segment_keyword()
3160    }
3161
3162    /// Was this symbol index predefined in the compiler's `symbols!` macro?
3163    /// Note: this applies to both `Symbol`s and `ByteSymbol`s, which is why it
3164    /// takes a `u32` argument instead of a `&self` argument. Use with care.
3165    pub fn is_predefined(index: u32) -> bool {
3166        index < PREDEFINED_SYMBOLS_COUNT
3167    }
3168}
3169
3170impl Ident {
3171    /// Returns `true` for reserved identifiers used internally for elided lifetimes,
3172    /// unnamed method parameters, crate root module, error recovery etc.
3173    pub fn is_special(self) -> bool {
3174        self.name.is_special()
3175    }
3176
3177    /// Returns `true` if the token is a keyword used in the language.
3178    pub fn is_used_keyword(self) -> bool {
3179        // Note: `span.edition()` is relatively expensive, don't call it unless necessary.
3180        self.name.is_used_keyword_always()
3181            || self.name.is_used_keyword_conditional(|| self.span.edition())
3182    }
3183
3184    /// Returns `true` if the token is a keyword reserved for possible future use.
3185    pub fn is_unused_keyword(self) -> bool {
3186        // Note: `span.edition()` is relatively expensive, don't call it unless necessary.
3187        self.name.is_unused_keyword_always()
3188            || self.name.is_unused_keyword_conditional(|| self.span.edition())
3189    }
3190
3191    /// Returns `true` if the token is either a special identifier or a keyword.
3192    pub fn is_reserved(self) -> bool {
3193        // Note: `span.edition()` is relatively expensive, don't call it unless necessary.
3194        self.name.is_reserved(|| self.span.edition())
3195    }
3196
3197    /// A keyword or reserved identifier that can be used as a path segment.
3198    pub fn is_path_segment_keyword(self) -> bool {
3199        self.name.is_path_segment_keyword()
3200    }
3201
3202    /// We see this identifier in a normal identifier position, like variable name or a type.
3203    /// How was it written originally? Did it use the raw form? Let's try to guess.
3204    pub fn is_raw_guess(self) -> bool {
3205        self.name.can_be_raw() && self.is_reserved()
3206    }
3207
3208    /// Given the name of a lifetime without the first quote (`'`),
3209    /// returns whether the lifetime name is reserved (therefore invalid)
3210    pub fn is_reserved_lifetime(self) -> bool {
3211        self.is_reserved() && ![kw::Underscore, kw::Static].contains(&self.name)
3212    }
3213
3214    pub fn is_raw_lifetime_guess(self) -> bool {
3215        // Check that the name isn't just a single quote.
3216        // `self.without_first_quote()` would return empty ident, which triggers debug assert.
3217        if self.name.as_str() == "'" {
3218            return false;
3219        }
3220        let ident_without_apostrophe = self.without_first_quote();
3221        ident_without_apostrophe.name != self.name
3222            && ident_without_apostrophe.name.can_be_raw()
3223            && ident_without_apostrophe.is_reserved_lifetime()
3224    }
3225
3226    pub fn guess_print_mode(self) -> IdentPrintMode {
3227        if self.is_raw_lifetime_guess() {
3228            IdentPrintMode::RawLifetime
3229        } else if self.is_raw_guess() {
3230            IdentPrintMode::RawIdent
3231        } else {
3232            IdentPrintMode::Normal
3233        }
3234    }
3235
3236    /// Whether this would be the identifier for a tuple field like `self.0`, as
3237    /// opposed to a named field like `self.thing`.
3238    pub fn is_numeric(self) -> bool {
3239        self.as_str().bytes().all(|b| b.is_ascii_digit())
3240    }
3241}
3242
3243/// Collect all the keywords in a given edition into a vector.
3244///
3245/// *Note:* Please update this if a new keyword is added beyond the current
3246/// range.
3247pub fn used_keywords(edition: impl Copy + FnOnce() -> Edition) -> Vec<Symbol> {
3248    (kw::DollarCrate.as_u32()..kw::Yeet.as_u32())
3249        .filter_map(|kw| {
3250            let kw = Symbol::new(kw);
3251            if kw.is_used_keyword_always() || kw.is_used_keyword_conditional(edition) {
3252                Some(kw)
3253            } else {
3254                None
3255            }
3256        })
3257        .collect()
3258}