]> git.proxmox.com Git - rustc.git/blobdiff - compiler/rustc_span/src/symbol.rs
New upstream version 1.60.0+dfsg1
[rustc.git] / compiler / rustc_span / src / symbol.rs
index e008224ec08c99cc5fc520656111fe1503accbbb..c746255e95e18b693e946eb20654023de67acec7 100644 (file)
@@ -184,6 +184,7 @@ symbols! {
         Formatter,
         From,
         FromIterator,
+        FromResidual,
         Future,
         FxHashMap,
         FxHashSet,
@@ -208,6 +209,7 @@ symbols! {
         LinkedList,
         LintPass,
         Mutex,
+        N,
         None,
         Ok,
         Option,
@@ -271,7 +273,6 @@ symbols! {
         __H,
         __S,
         __try_var,
-        _args,
         _d,
         _e,
         _task_context,
@@ -315,18 +316,22 @@ symbols! {
         allow_internal_unsafe,
         allow_internal_unstable,
         allowed,
+        alu32,
         always,
         and,
         and_then,
         any,
+        append_const_msg,
         arbitrary_enum_discriminant,
         arbitrary_self_types,
+        args,
         arith_offset,
         arm,
         arm_target_feature,
         array,
         arrays,
         as_ptr,
+        as_ref,
         as_str,
         asm,
         asm_const,
@@ -334,11 +339,14 @@ symbols! {
         asm_sym,
         asm_unwind,
         assert,
+        assert_eq_macro,
         assert_inhabited,
         assert_macro,
+        assert_ne_macro,
         assert_receiver_is_total_eq,
         assert_uninit_valid,
         assert_zero_valid,
+        associated_const_equality,
         associated_consts,
         associated_type_bounds,
         associated_type_defaults,
@@ -357,7 +365,10 @@ symbols! {
         augmented_assignments,
         auto_traits,
         automatically_derived,
+        avx,
         avx512_target_feature,
+        avx512bw,
+        avx512f,
         await_macro,
         bang,
         begin_panic,
@@ -405,11 +416,14 @@ symbols! {
         cfg_doctest,
         cfg_eval,
         cfg_hide,
+        cfg_macro,
         cfg_panic,
         cfg_sanitize,
         cfg_target_abi,
         cfg_target_feature,
         cfg_target_has_atomic,
+        cfg_target_has_atomic_equal_alignment,
+        cfg_target_has_atomic_load_store,
         cfg_target_thread_local,
         cfg_target_vendor,
         cfg_version,
@@ -432,21 +446,26 @@ symbols! {
         coerce_unsized,
         cold,
         column,
+        column_macro,
         compare_and_swap,
         compare_exchange,
         compare_exchange_weak,
         compile_error,
+        compile_error_macro,
+        compiler,
         compiler_builtins,
         compiler_fence,
         concat,
         concat_bytes,
         concat_idents,
+        concat_macro,
         conservative_impl_trait,
         console,
         const_allocate,
         const_async_blocks,
         const_compare_raw_pointers,
         const_constructor,
+        const_deallocate,
         const_eval_limit,
         const_eval_select,
         const_eval_select_ct,
@@ -520,10 +539,13 @@ symbols! {
         custom_inner_attributes,
         custom_test_frameworks,
         d,
+        dbg_macro,
         dead_code,
         dealloc,
         debug,
+        debug_assert_eq_macro,
         debug_assert_macro,
+        debug_assert_ne_macro,
         debug_assertions,
         debug_struct,
         debug_trait_builder,
@@ -567,6 +589,7 @@ symbols! {
         doc_spotlight,
         doctest,
         document_private_items,
+        dotdot: "..",
         dotdot_in_tuple_patterns,
         dotdoteq_in_patterns,
         dreg,
@@ -580,6 +603,7 @@ symbols! {
         dylib,
         dyn_metadata,
         dyn_trait,
+        e,
         edition_macro_pats,
         edition_panic,
         eh_catch_typeinfo,
@@ -592,7 +616,11 @@ symbols! {
         enable,
         enclosing_scope,
         encode,
+        end,
         env,
+        env_macro,
+        eprint_macro,
+        eprintln_macro,
         eq,
         ermsb_target_feature,
         exact_div,
@@ -640,9 +668,11 @@ symbols! {
         field,
         field_init_shorthand,
         file,
+        file_macro,
         fill,
         finish,
         flags,
+        float,
         float_to_int_unchecked,
         floorf32,
         floorf64,
@@ -662,8 +692,10 @@ symbols! {
         format,
         format_args,
         format_args_capture,
+        format_args_macro,
         format_args_nl,
         format_macro,
+        fp,
         freeze,
         freg,
         frem_fast,
@@ -728,7 +760,10 @@ symbols! {
         in_band_lifetimes,
         include,
         include_bytes,
+        include_bytes_macro,
+        include_macro,
         include_str,
+        include_str_macro,
         inclusive_range_syntax,
         index,
         index_mut,
@@ -741,6 +776,8 @@ symbols! {
         inline_const_pat,
         inout,
         instruction_set,
+        integer_: "integer",
+        integral,
         intel,
         into_future,
         into_iter,
@@ -776,6 +813,7 @@ symbols! {
         lifetime,
         likely,
         line,
+        line_macro,
         link,
         link_args,
         link_cfg,
@@ -784,9 +822,9 @@ symbols! {
         link_ordinal,
         link_section,
         linkage,
+        linker,
         lint_reasons,
         literal,
-        llvm_asm,
         load,
         loaded_from_disk,
         local,
@@ -819,6 +857,7 @@ symbols! {
         masked,
         match_beginning_vert,
         match_default_bindings,
+        matches_macro,
         maxnumf32,
         maxnumf64,
         may_dangle,
@@ -837,6 +876,7 @@ symbols! {
         mem_zeroed,
         member_constraints,
         memory,
+        memtag,
         message,
         meta,
         metadata_type,
@@ -855,6 +895,7 @@ symbols! {
         modifiers,
         module,
         module_path,
+        module_path_macro,
         more_qualified_paths,
         more_struct_aliases,
         movbe_target_feature,
@@ -870,6 +911,7 @@ symbols! {
         naked,
         naked_functions,
         name,
+        names,
         native_link_modifiers,
         native_link_modifiers_as_needed,
         native_link_modifiers_bundle,
@@ -884,6 +926,7 @@ symbols! {
         neg,
         negate_unsigned,
         negative_impls,
+        neon,
         never,
         never_type,
         never_type_fallback,
@@ -938,6 +981,7 @@ symbols! {
         optin_builtin_traits,
         option,
         option_env,
+        option_env_macro,
         options,
         or,
         or_patterns,
@@ -958,6 +1002,7 @@ symbols! {
         panic_implementation,
         panic_info,
         panic_location,
+        panic_no_unwind,
         panic_runtime,
         panic_str,
         panic_unwind,
@@ -1001,6 +1046,8 @@ symbols! {
         prelude_import,
         preserves_flags,
         primitive,
+        print_macro,
+        println_macro,
         proc_dash_macro: "proc-macro",
         proc_macro,
         proc_macro_attribute,
@@ -1075,6 +1122,7 @@ symbols! {
         repr_packed,
         repr_simd,
         repr_transparent,
+        reserved_r9: "reserved-r9",
         residual,
         result,
         rhs,
@@ -1133,9 +1181,11 @@ symbols! {
         rustc_layout_scalar_valid_range_end,
         rustc_layout_scalar_valid_range_start,
         rustc_legacy_const_generics,
+        rustc_lint_query_instability,
         rustc_macro_transparency,
         rustc_main,
         rustc_mir,
+        rustc_must_implement_one_of,
         rustc_nonnull_optimization_guaranteed,
         rustc_object_lifetime_default,
         rustc_on_unimplemented,
@@ -1143,6 +1193,7 @@ symbols! {
         rustc_paren_sugar,
         rustc_partition_codegened,
         rustc_partition_reused,
+        rustc_pass_by_value,
         rustc_peek,
         rustc_peek_definite_init,
         rustc_peek_liveness,
@@ -1186,6 +1237,7 @@ symbols! {
         simd,
         simd_add,
         simd_and,
+        simd_as,
         simd_bitmask,
         simd_cast,
         simd_ceil,
@@ -1267,6 +1319,7 @@ symbols! {
         sqrtf64,
         sreg,
         sreg_low16,
+        sse,
         sse4a_target_feature,
         stable,
         staged_api,
@@ -1288,6 +1341,7 @@ symbols! {
         str,
         str_alloc,
         stringify,
+        stringify_macro,
         struct_field_attributes,
         struct_inherit,
         struct_variant,
@@ -1331,6 +1385,10 @@ symbols! {
         then_with,
         thread,
         thread_local,
+        thread_local_macro,
+        thumb2,
+        thumb_mode: "thumb-mode",
+        todo_macro,
         tool_attributes,
         tool_lints,
         trace_macros,
@@ -1381,6 +1439,7 @@ symbols! {
         underscore_imports,
         underscore_lifetimes,
         uniform_paths,
+        unimplemented_macro,
         unit,
         universal_impl_trait,
         unix,
@@ -1399,6 +1458,7 @@ symbols! {
         unsafe_block_in_unsafe_fn,
         unsafe_cell,
         unsafe_no_drop_flag,
+        unsafe_pin_internals,
         unsize,
         unsized_fn_params,
         unsized_locals,
@@ -1414,6 +1474,7 @@ symbols! {
         use_extern_macros,
         use_nested_groups,
         used,
+        used_with_arg,
         usize,
         v1,
         va_arg,
@@ -1422,10 +1483,13 @@ symbols! {
         va_list,
         va_start,
         val,
+        values,
         var,
         variant_count,
         vec,
+        vec_macro,
         version,
+        vfp2,
         vis,
         visible_private_types,
         volatile,
@@ -1444,12 +1508,15 @@ symbols! {
         width,
         windows,
         windows_subsystem,
+        with_negative_coherence,
         wrapping_add,
         wrapping_mul,
         wrapping_sub,
         wreg,
         write_bytes,
+        write_macro,
         write_str,
+        writeln_macro,
         x87_reg,
         xer,
         xmm_reg,
@@ -1711,8 +1778,8 @@ impl<S: Encoder> Encodable<S> for Symbol {
 
 impl<D: Decoder> Decodable<D> for Symbol {
     #[inline]
-    fn decode(d: &mut D) -> Result<Symbol, D::Error> {
-        Ok(Symbol::intern(&d.read_str()?))
+    fn decode(d: &mut D) -> Symbol {
+        Symbol::intern(&d.read_str())
     }
 }