Skip to main content

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