Skip to main content

rustc_codegen_ssa/
lib.rs

1// tidy-alphabetical-start
2#![feature(assert_matches)]
3#![feature(box_patterns)]
4#![feature(file_buffered)]
5#![feature(if_let_guard)]
6#![feature(negative_impls)]
7#![feature(string_from_utf8_lossy_owned)]
8#![feature(trait_alias)]
9#![feature(try_blocks)]
10#![recursion_limit = "256"]
11// tidy-alphabetical-end
12
13//! This crate contains codegen code that is used by all codegen backends (LLVM and others).
14//! The backend-agnostic functions of this crate use functions defined in various traits that
15//! have to be implemented by each backend.
16
17use std::collections::BTreeSet;
18use std::io;
19use std::path::{Path, PathBuf};
20use std::sync::Arc;
21
22use rustc_data_structures::fx::{FxHashSet, FxIndexMap};
23use rustc_data_structures::unord::UnordMap;
24use rustc_hir::CRATE_HIR_ID;
25use rustc_hir::attrs::{CfgEntry, NativeLibKind, WindowsSubsystemKind};
26use rustc_hir::def_id::CrateNum;
27use rustc_macros::{Decodable, Encodable, HashStable};
28use rustc_metadata::EncodedMetadata;
29use rustc_middle::dep_graph::WorkProduct;
30use rustc_middle::lint::LevelAndSource;
31use rustc_middle::middle::debugger_visualizer::DebuggerVisualizerFile;
32use rustc_middle::middle::dependency_format::Dependencies;
33use rustc_middle::middle::exported_symbols::SymbolExportKind;
34use rustc_middle::ty::TyCtxt;
35use rustc_middle::util::Providers;
36use rustc_serialize::opaque::{FileEncoder, MemDecoder};
37use rustc_serialize::{Decodable, Decoder, Encodable, Encoder};
38use rustc_session::Session;
39use rustc_session::config::{CrateType, OutputFilenames, OutputType, RUST_CGU_EXT};
40use rustc_session::cstore::{self, CrateSource};
41use rustc_session::lint::builtin::LINKER_MESSAGES;
42use rustc_span::Symbol;
43
44pub mod assert_module_sources;
45pub mod back;
46pub mod base;
47pub mod codegen_attrs;
48pub mod common;
49pub mod debuginfo;
50pub mod errors;
51pub mod meth;
52pub mod mir;
53pub mod mono_item;
54pub mod size_of_val;
55pub mod target_features;
56pub mod traits;
57
58#[allow(non_upper_case_globals)]
#[doc(hidden)]
#[doc =
r" Auto-generated constants for type-checked references to Fluent messages."]
pub(crate) mod fluent_generated {
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_L4Bender_exporting_symbols_unimplemented` from `codegen_ssa`"]
    pub const codegen_ssa_L4Bender_exporting_symbols_unimplemented:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_L4Bender_exporting_symbols_unimplemented"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_aarch64_softfloat_neon` from `codegen_ssa`"]
    pub const codegen_ssa_aarch64_softfloat_neon: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_aarch64_softfloat_neon"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_add_native_library` from `codegen_ssa`"]
    pub const codegen_ssa_add_native_library: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_add_native_library"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_aix_strip_not_used` from `codegen_ssa`"]
    pub const codegen_ssa_aix_strip_not_used: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_aix_strip_not_used"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_archive_build_failure` from `codegen_ssa`"]
    pub const codegen_ssa_archive_build_failure: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_archive_build_failure"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_binary_output_to_tty` from `codegen_ssa`"]
    pub const codegen_ssa_binary_output_to_tty: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_binary_output_to_tty"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_bpf_staticlib_not_supported` from `codegen_ssa`"]
    pub const codegen_ssa_bpf_staticlib_not_supported:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_bpf_staticlib_not_supported"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_cgu_not_recorded` from `codegen_ssa`"]
    pub const codegen_ssa_cgu_not_recorded: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_cgu_not_recorded"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_check_installed_visual_studio` from `codegen_ssa`"]
    pub const codegen_ssa_check_installed_visual_studio:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_check_installed_visual_studio"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_compiler_builtins_cannot_call` from `codegen_ssa`"]
    pub const codegen_ssa_compiler_builtins_cannot_call:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_compiler_builtins_cannot_call"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_copy_path` from `codegen_ssa`"]
    pub const codegen_ssa_copy_path: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_copy_path"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_copy_path_buf` from `codegen_ssa`"]
    pub const codegen_ssa_copy_path_buf: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_copy_path_buf"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_cpu_required` from `codegen_ssa`"]
    pub const codegen_ssa_cpu_required: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_cpu_required"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_create_temp_dir` from `codegen_ssa`"]
    pub const codegen_ssa_create_temp_dir: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_create_temp_dir"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_dlltool_fail_import_library` from `codegen_ssa`"]
    pub const codegen_ssa_dlltool_fail_import_library:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_dlltool_fail_import_library"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_dynamic_linking_with_lto` from `codegen_ssa`"]
    pub const codegen_ssa_dynamic_linking_with_lto: rustc_errors::DiagMessage
        =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_dynamic_linking_with_lto"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_dynamic_linking_with_lto.note` from `codegen_ssa`"]
    pub const codegen_ssa_note: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("note"));
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_error_calling_dlltool` from `codegen_ssa`"]
    pub const codegen_ssa_error_calling_dlltool: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_error_calling_dlltool"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_error_creating_import_library` from `codegen_ssa`"]
    pub const codegen_ssa_error_creating_import_library:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_error_creating_import_library"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_error_creating_remark_dir` from `codegen_ssa`"]
    pub const codegen_ssa_error_creating_remark_dir: rustc_errors::DiagMessage
        =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_error_creating_remark_dir"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_error_writing_def_file` from `codegen_ssa`"]
    pub const codegen_ssa_error_writing_def_file: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_error_writing_def_file"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_extern_funcs_not_found` from `codegen_ssa`"]
    pub const codegen_ssa_extern_funcs_not_found: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_extern_funcs_not_found"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_extract_bundled_libs_archive_member` from `codegen_ssa`"]
    pub const codegen_ssa_extract_bundled_libs_archive_member:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_extract_bundled_libs_archive_member"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_extract_bundled_libs_convert_name` from `codegen_ssa`"]
    pub const codegen_ssa_extract_bundled_libs_convert_name:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_extract_bundled_libs_convert_name"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_extract_bundled_libs_mmap_file` from `codegen_ssa`"]
    pub const codegen_ssa_extract_bundled_libs_mmap_file:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_extract_bundled_libs_mmap_file"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_extract_bundled_libs_open_file` from `codegen_ssa`"]
    pub const codegen_ssa_extract_bundled_libs_open_file:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_extract_bundled_libs_open_file"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_extract_bundled_libs_parse_archive` from `codegen_ssa`"]
    pub const codegen_ssa_extract_bundled_libs_parse_archive:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_extract_bundled_libs_parse_archive"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_extract_bundled_libs_read_entry` from `codegen_ssa`"]
    pub const codegen_ssa_extract_bundled_libs_read_entry:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_extract_bundled_libs_read_entry"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_extract_bundled_libs_write_file` from `codegen_ssa`"]
    pub const codegen_ssa_extract_bundled_libs_write_file:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_extract_bundled_libs_write_file"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_failed_to_get_layout` from `codegen_ssa`"]
    pub const codegen_ssa_failed_to_get_layout: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_failed_to_get_layout"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_failed_to_write` from `codegen_ssa`"]
    pub const codegen_ssa_failed_to_write: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_failed_to_write"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_feature_not_valid` from `codegen_ssa`"]
    pub const codegen_ssa_feature_not_valid: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_feature_not_valid"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_feature_not_valid.label` from `codegen_ssa`"]
    pub const codegen_ssa_label: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("label"));
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_feature_not_valid.help` from `codegen_ssa`"]
    pub const codegen_ssa_help: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("help"));
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_field_associated_value_expected` from `codegen_ssa`"]
    pub const codegen_ssa_field_associated_value_expected:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_field_associated_value_expected"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_forbidden_ctarget_feature` from `codegen_ssa`"]
    pub const codegen_ssa_forbidden_ctarget_feature: rustc_errors::DiagMessage
        =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_forbidden_ctarget_feature"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_forbidden_ctarget_feature_issue` from `codegen_ssa`"]
    pub const codegen_ssa_forbidden_ctarget_feature_issue:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_forbidden_ctarget_feature_issue"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_forbidden_target_feature_attr` from `codegen_ssa`"]
    pub const codegen_ssa_forbidden_target_feature_attr:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_forbidden_target_feature_attr"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_ignoring_emit_path` from `codegen_ssa`"]
    pub const codegen_ssa_ignoring_emit_path: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_ignoring_emit_path"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_ignoring_output` from `codegen_ssa`"]
    pub const codegen_ssa_ignoring_output: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_ignoring_output"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_incorrect_cgu_reuse_type` from `codegen_ssa`"]
    pub const codegen_ssa_incorrect_cgu_reuse_type: rustc_errors::DiagMessage
        =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_incorrect_cgu_reuse_type"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_insufficient_vs_code_product` from `codegen_ssa`"]
    pub const codegen_ssa_insufficient_vs_code_product:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_insufficient_vs_code_product"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_invalid_monomorphization_basic_float_type` from `codegen_ssa`"]
    pub const codegen_ssa_invalid_monomorphization_basic_float_type:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_invalid_monomorphization_basic_float_type"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_invalid_monomorphization_basic_integer_or_ptr_type` from `codegen_ssa`"]
    pub const codegen_ssa_invalid_monomorphization_basic_integer_or_ptr_type:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_invalid_monomorphization_basic_integer_or_ptr_type"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_invalid_monomorphization_basic_integer_type` from `codegen_ssa`"]
    pub const codegen_ssa_invalid_monomorphization_basic_integer_type:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_invalid_monomorphization_basic_integer_type"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_invalid_monomorphization_cannot_return` from `codegen_ssa`"]
    pub const codegen_ssa_invalid_monomorphization_cannot_return:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_invalid_monomorphization_cannot_return"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_invalid_monomorphization_cast_wide_pointer` from `codegen_ssa`"]
    pub const codegen_ssa_invalid_monomorphization_cast_wide_pointer:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_invalid_monomorphization_cast_wide_pointer"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_invalid_monomorphization_expected_element_type` from `codegen_ssa`"]
    pub const codegen_ssa_invalid_monomorphization_expected_element_type:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_invalid_monomorphization_expected_element_type"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_invalid_monomorphization_expected_pointer` from `codegen_ssa`"]
    pub const codegen_ssa_invalid_monomorphization_expected_pointer:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_invalid_monomorphization_expected_pointer"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_invalid_monomorphization_expected_return_type` from `codegen_ssa`"]
    pub const codegen_ssa_invalid_monomorphization_expected_return_type:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_invalid_monomorphization_expected_return_type"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_invalid_monomorphization_expected_usize` from `codegen_ssa`"]
    pub const codegen_ssa_invalid_monomorphization_expected_usize:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_invalid_monomorphization_expected_usize"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_invalid_monomorphization_expected_vector_element_type` from `codegen_ssa`"]
    pub const
        codegen_ssa_invalid_monomorphization_expected_vector_element_type:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_invalid_monomorphization_expected_vector_element_type"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_invalid_monomorphization_float_to_int_unchecked` from `codegen_ssa`"]
    pub const codegen_ssa_invalid_monomorphization_float_to_int_unchecked:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_invalid_monomorphization_float_to_int_unchecked"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_invalid_monomorphization_floating_point_type` from `codegen_ssa`"]
    pub const codegen_ssa_invalid_monomorphization_floating_point_type:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_invalid_monomorphization_floating_point_type"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_invalid_monomorphization_floating_point_vector` from `codegen_ssa`"]
    pub const codegen_ssa_invalid_monomorphization_floating_point_vector:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_invalid_monomorphization_floating_point_vector"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_invalid_monomorphization_inserted_type` from `codegen_ssa`"]
    pub const codegen_ssa_invalid_monomorphization_inserted_type:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_invalid_monomorphization_inserted_type"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_invalid_monomorphization_invalid_bitmask` from `codegen_ssa`"]
    pub const codegen_ssa_invalid_monomorphization_invalid_bitmask:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_invalid_monomorphization_invalid_bitmask"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_invalid_monomorphization_mask_wrong_element_type` from `codegen_ssa`"]
    pub const codegen_ssa_invalid_monomorphization_mask_wrong_element_type:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_invalid_monomorphization_mask_wrong_element_type"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_invalid_monomorphization_mismatched_lengths` from `codegen_ssa`"]
    pub const codegen_ssa_invalid_monomorphization_mismatched_lengths:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_invalid_monomorphization_mismatched_lengths"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_invalid_monomorphization_non_scalable_type` from `codegen_ssa`"]
    pub const codegen_ssa_invalid_monomorphization_non_scalable_type:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_invalid_monomorphization_non_scalable_type"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_invalid_monomorphization_return_element` from `codegen_ssa`"]
    pub const codegen_ssa_invalid_monomorphization_return_element:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_invalid_monomorphization_return_element"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_invalid_monomorphization_return_integer_type` from `codegen_ssa`"]
    pub const codegen_ssa_invalid_monomorphization_return_integer_type:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_invalid_monomorphization_return_integer_type"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_invalid_monomorphization_return_length` from `codegen_ssa`"]
    pub const codegen_ssa_invalid_monomorphization_return_length:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_invalid_monomorphization_return_length"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_invalid_monomorphization_return_length_input_type` from `codegen_ssa`"]
    pub const codegen_ssa_invalid_monomorphization_return_length_input_type:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_invalid_monomorphization_return_length_input_type"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_invalid_monomorphization_return_type` from `codegen_ssa`"]
    pub const codegen_ssa_invalid_monomorphization_return_type:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_invalid_monomorphization_return_type"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_invalid_monomorphization_second_argument_length` from `codegen_ssa`"]
    pub const codegen_ssa_invalid_monomorphization_second_argument_length:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_invalid_monomorphization_second_argument_length"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_invalid_monomorphization_simd_argument` from `codegen_ssa`"]
    pub const codegen_ssa_invalid_monomorphization_simd_argument:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_invalid_monomorphization_simd_argument"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_invalid_monomorphization_simd_first` from `codegen_ssa`"]
    pub const codegen_ssa_invalid_monomorphization_simd_first:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_invalid_monomorphization_simd_first"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_invalid_monomorphization_simd_index_out_of_bounds` from `codegen_ssa`"]
    pub const codegen_ssa_invalid_monomorphization_simd_index_out_of_bounds:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_invalid_monomorphization_simd_index_out_of_bounds"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_invalid_monomorphization_simd_input` from `codegen_ssa`"]
    pub const codegen_ssa_invalid_monomorphization_simd_input:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_invalid_monomorphization_simd_input"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_invalid_monomorphization_simd_return` from `codegen_ssa`"]
    pub const codegen_ssa_invalid_monomorphization_simd_return:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_invalid_monomorphization_simd_return"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_invalid_monomorphization_simd_second` from `codegen_ssa`"]
    pub const codegen_ssa_invalid_monomorphization_simd_second:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_invalid_monomorphization_simd_second"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_invalid_monomorphization_simd_shuffle` from `codegen_ssa`"]
    pub const codegen_ssa_invalid_monomorphization_simd_shuffle:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_invalid_monomorphization_simd_shuffle"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_invalid_monomorphization_simd_third` from `codegen_ssa`"]
    pub const codegen_ssa_invalid_monomorphization_simd_third:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_invalid_monomorphization_simd_third"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_invalid_monomorphization_third_argument_length` from `codegen_ssa`"]
    pub const codegen_ssa_invalid_monomorphization_third_argument_length:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_invalid_monomorphization_third_argument_length"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_invalid_monomorphization_unrecognized_intrinsic` from `codegen_ssa`"]
    pub const codegen_ssa_invalid_monomorphization_unrecognized_intrinsic:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_invalid_monomorphization_unrecognized_intrinsic"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_invalid_monomorphization_unsupported_cast` from `codegen_ssa`"]
    pub const codegen_ssa_invalid_monomorphization_unsupported_cast:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_invalid_monomorphization_unsupported_cast"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_invalid_monomorphization_unsupported_operation` from `codegen_ssa`"]
    pub const codegen_ssa_invalid_monomorphization_unsupported_operation:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_invalid_monomorphization_unsupported_operation"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_invalid_monomorphization_unsupported_symbol` from `codegen_ssa`"]
    pub const codegen_ssa_invalid_monomorphization_unsupported_symbol:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_invalid_monomorphization_unsupported_symbol"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_invalid_monomorphization_unsupported_symbol_of_size` from `codegen_ssa`"]
    pub const codegen_ssa_invalid_monomorphization_unsupported_symbol_of_size:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_invalid_monomorphization_unsupported_symbol_of_size"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_ld64_unimplemented_modifier` from `codegen_ssa`"]
    pub const codegen_ssa_ld64_unimplemented_modifier:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_ld64_unimplemented_modifier"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_lib_def_write_failure` from `codegen_ssa`"]
    pub const codegen_ssa_lib_def_write_failure: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_lib_def_write_failure"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_link_exe_status_stack_buffer_overrun` from `codegen_ssa`"]
    pub const codegen_ssa_link_exe_status_stack_buffer_overrun:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_link_exe_status_stack_buffer_overrun"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_link_exe_status_stack_buffer_overrun.abort_note` from `codegen_ssa`"]
    pub const codegen_ssa_abort_note: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("abort_note"));
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_link_exe_status_stack_buffer_overrun.event_log_note` from `codegen_ssa`"]
    pub const codegen_ssa_event_log_note: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("event_log_note"));
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_link_exe_unexpected_error` from `codegen_ssa`"]
    pub const codegen_ssa_link_exe_unexpected_error: rustc_errors::DiagMessage
        =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_link_exe_unexpected_error"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_link_script_unavailable` from `codegen_ssa`"]
    pub const codegen_ssa_link_script_unavailable: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_link_script_unavailable"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_link_script_write_failure` from `codegen_ssa`"]
    pub const codegen_ssa_link_script_write_failure: rustc_errors::DiagMessage
        =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_link_script_write_failure"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_linker_file_stem` from `codegen_ssa`"]
    pub const codegen_ssa_linker_file_stem: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_linker_file_stem"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_linker_not_found` from `codegen_ssa`"]
    pub const codegen_ssa_linker_not_found: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_linker_not_found"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_linker_output` from `codegen_ssa`"]
    pub const codegen_ssa_linker_output: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_linker_output"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_linker_unsupported_modifier` from `codegen_ssa`"]
    pub const codegen_ssa_linker_unsupported_modifier:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_linker_unsupported_modifier"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_linking_failed` from `codegen_ssa`"]
    pub const codegen_ssa_linking_failed: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_linking_failed"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_lto_disallowed` from `codegen_ssa`"]
    pub const codegen_ssa_lto_disallowed: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_lto_disallowed"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_lto_dylib` from `codegen_ssa`"]
    pub const codegen_ssa_lto_dylib: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_lto_dylib"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_lto_proc_macro` from `codegen_ssa`"]
    pub const codegen_ssa_lto_proc_macro: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_lto_proc_macro"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_malformed_cgu_name` from `codegen_ssa`"]
    pub const codegen_ssa_malformed_cgu_name: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_malformed_cgu_name"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_missing_cpp_build_tool_component` from `codegen_ssa`"]
    pub const codegen_ssa_missing_cpp_build_tool_component:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_missing_cpp_build_tool_component"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_missing_features` from `codegen_ssa`"]
    pub const codegen_ssa_missing_features: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_missing_features"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_missing_query_depgraph` from `codegen_ssa`"]
    pub const codegen_ssa_missing_query_depgraph: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_missing_query_depgraph"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_msvc_missing_linker` from `codegen_ssa`"]
    pub const codegen_ssa_msvc_missing_linker: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_msvc_missing_linker"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_multiple_external_func_decl` from `codegen_ssa`"]
    pub const codegen_ssa_multiple_external_func_decl:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_multiple_external_func_decl"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_multiple_main_functions` from `codegen_ssa`"]
    pub const codegen_ssa_multiple_main_functions: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_multiple_main_functions"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_no_field` from `codegen_ssa`"]
    pub const codegen_ssa_no_field: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_no_field"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_no_module_named` from `codegen_ssa`"]
    pub const codegen_ssa_no_module_named: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_no_module_named"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_no_natvis_directory` from `codegen_ssa`"]
    pub const codegen_ssa_no_natvis_directory: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_no_natvis_directory"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_no_saved_object_file` from `codegen_ssa`"]
    pub const codegen_ssa_no_saved_object_file: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_no_saved_object_file"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_processing_dymutil_failed` from `codegen_ssa`"]
    pub const codegen_ssa_processing_dymutil_failed: rustc_errors::DiagMessage
        =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_processing_dymutil_failed"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_read_file` from `codegen_ssa`"]
    pub const codegen_ssa_read_file: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_read_file"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_repair_vs_build_tools` from `codegen_ssa`"]
    pub const codegen_ssa_repair_vs_build_tools: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_repair_vs_build_tools"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_requires_rust_abi` from `codegen_ssa`"]
    pub const codegen_ssa_requires_rust_abi: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_requires_rust_abi"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_rlib_archive_build_failure` from `codegen_ssa`"]
    pub const codegen_ssa_rlib_archive_build_failure:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_rlib_archive_build_failure"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_rlib_incompatible_dependency_formats` from `codegen_ssa`"]
    pub const codegen_ssa_rlib_incompatible_dependency_formats:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_rlib_incompatible_dependency_formats"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_rlib_missing_format` from `codegen_ssa`"]
    pub const codegen_ssa_rlib_missing_format: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_rlib_missing_format"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_rlib_not_found` from `codegen_ssa`"]
    pub const codegen_ssa_rlib_not_found: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_rlib_not_found"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_rlib_only_rmeta_found` from `codegen_ssa`"]
    pub const codegen_ssa_rlib_only_rmeta_found: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_rlib_only_rmeta_found"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_select_cpp_build_tool_workload` from `codegen_ssa`"]
    pub const codegen_ssa_select_cpp_build_tool_workload:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_select_cpp_build_tool_workload"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_self_contained_linker_missing` from `codegen_ssa`"]
    pub const codegen_ssa_self_contained_linker_missing:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_self_contained_linker_missing"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_shuffle_indices_evaluation` from `codegen_ssa`"]
    pub const codegen_ssa_shuffle_indices_evaluation:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_shuffle_indices_evaluation"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_specify_libraries_to_link` from `codegen_ssa`"]
    pub const codegen_ssa_specify_libraries_to_link: rustc_errors::DiagMessage
        =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_specify_libraries_to_link"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_static_library_native_artifacts` from `codegen_ssa`"]
    pub const codegen_ssa_static_library_native_artifacts:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_static_library_native_artifacts"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_static_library_native_artifacts_to_file` from `codegen_ssa`"]
    pub const codegen_ssa_static_library_native_artifacts_to_file:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_static_library_native_artifacts_to_file"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_stripping_debug_info_failed` from `codegen_ssa`"]
    pub const codegen_ssa_stripping_debug_info_failed:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_stripping_debug_info_failed"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_symbol_file_write_failure` from `codegen_ssa`"]
    pub const codegen_ssa_symbol_file_write_failure: rustc_errors::DiagMessage
        =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_symbol_file_write_failure"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_target_feature_disable_or_enable` from `codegen_ssa`"]
    pub const codegen_ssa_target_feature_disable_or_enable:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_target_feature_disable_or_enable"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_target_feature_safe_trait` from `codegen_ssa`"]
    pub const codegen_ssa_target_feature_safe_trait: rustc_errors::DiagMessage
        =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_target_feature_safe_trait"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_target_feature_safe_trait.label_def` from `codegen_ssa`"]
    pub const codegen_ssa_label_def: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("label_def"));
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_thorin_decompress_data` from `codegen_ssa`"]
    pub const codegen_ssa_thorin_decompress_data: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_thorin_decompress_data"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_thorin_duplicate_unit` from `codegen_ssa`"]
    pub const codegen_ssa_thorin_duplicate_unit: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_thorin_duplicate_unit"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_thorin_empty_unit` from `codegen_ssa`"]
    pub const codegen_ssa_thorin_empty_unit: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_thorin_empty_unit"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_thorin_gimli_read` from `codegen_ssa`"]
    pub const codegen_ssa_thorin_gimli_read: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_thorin_gimli_read"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_thorin_gimli_write` from `codegen_ssa`"]
    pub const codegen_ssa_thorin_gimli_write: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_thorin_gimli_write"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_thorin_incompatible_index_version` from `codegen_ssa`"]
    pub const codegen_ssa_thorin_incompatible_index_version:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_thorin_incompatible_index_version"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_thorin_invalid_input_kind` from `codegen_ssa`"]
    pub const codegen_ssa_thorin_invalid_input_kind: rustc_errors::DiagMessage
        =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_thorin_invalid_input_kind"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_thorin_io` from `codegen_ssa`"]
    pub const codegen_ssa_thorin_io: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_thorin_io"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_thorin_missing_dwo_name` from `codegen_ssa`"]
    pub const codegen_ssa_thorin_missing_dwo_name: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_thorin_missing_dwo_name"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_thorin_missing_referenced_unit` from `codegen_ssa`"]
    pub const codegen_ssa_thorin_missing_referenced_unit:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_thorin_missing_referenced_unit"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_thorin_missing_required_section` from `codegen_ssa`"]
    pub const codegen_ssa_thorin_missing_required_section:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_thorin_missing_required_section"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_thorin_mixed_input_encodings` from `codegen_ssa`"]
    pub const codegen_ssa_thorin_mixed_input_encodings:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_thorin_mixed_input_encodings"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_thorin_multiple_debug_info_section` from `codegen_ssa`"]
    pub const codegen_ssa_thorin_multiple_debug_info_section:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_thorin_multiple_debug_info_section"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_thorin_multiple_debug_types_section` from `codegen_ssa`"]
    pub const codegen_ssa_thorin_multiple_debug_types_section:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_thorin_multiple_debug_types_section"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_thorin_multiple_relocations` from `codegen_ssa`"]
    pub const codegen_ssa_thorin_multiple_relocations:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_thorin_multiple_relocations"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_thorin_no_compilation_units` from `codegen_ssa`"]
    pub const codegen_ssa_thorin_no_compilation_units:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_thorin_no_compilation_units"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_thorin_no_die` from `codegen_ssa`"]
    pub const codegen_ssa_thorin_no_die: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_thorin_no_die"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_thorin_not_output_object_created` from `codegen_ssa`"]
    pub const codegen_ssa_thorin_not_output_object_created:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_thorin_not_output_object_created"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_thorin_not_split_unit` from `codegen_ssa`"]
    pub const codegen_ssa_thorin_not_split_unit: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_thorin_not_split_unit"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_thorin_object_read` from `codegen_ssa`"]
    pub const codegen_ssa_thorin_object_read: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_thorin_object_read"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_thorin_object_write` from `codegen_ssa`"]
    pub const codegen_ssa_thorin_object_write: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_thorin_object_write"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_thorin_offset_at_index` from `codegen_ssa`"]
    pub const codegen_ssa_thorin_offset_at_index: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_thorin_offset_at_index"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_thorin_parse_archive_member` from `codegen_ssa`"]
    pub const codegen_ssa_thorin_parse_archive_member:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_thorin_parse_archive_member"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_thorin_parse_index` from `codegen_ssa`"]
    pub const codegen_ssa_thorin_parse_index: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_thorin_parse_index"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_thorin_parse_input_archive_file` from `codegen_ssa`"]
    pub const codegen_ssa_thorin_parse_input_archive_file:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_thorin_parse_input_archive_file"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_thorin_parse_input_file_kind` from `codegen_ssa`"]
    pub const codegen_ssa_thorin_parse_input_file_kind:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_thorin_parse_input_file_kind"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_thorin_parse_input_object_file` from `codegen_ssa`"]
    pub const codegen_ssa_thorin_parse_input_object_file:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_thorin_parse_input_object_file"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_thorin_parse_unit` from `codegen_ssa`"]
    pub const codegen_ssa_thorin_parse_unit: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_thorin_parse_unit"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_thorin_parse_unit_abbreviations` from `codegen_ssa`"]
    pub const codegen_ssa_thorin_parse_unit_abbreviations:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_thorin_parse_unit_abbreviations"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_thorin_parse_unit_attribute` from `codegen_ssa`"]
    pub const codegen_ssa_thorin_parse_unit_attribute:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_thorin_parse_unit_attribute"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_thorin_parse_unit_header` from `codegen_ssa`"]
    pub const codegen_ssa_thorin_parse_unit_header: rustc_errors::DiagMessage
        =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_thorin_parse_unit_header"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_thorin_read_input_failure` from `codegen_ssa`"]
    pub const codegen_ssa_thorin_read_input_failure: rustc_errors::DiagMessage
        =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_thorin_read_input_failure"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_thorin_relocation_with_invalid_symbol` from `codegen_ssa`"]
    pub const codegen_ssa_thorin_relocation_with_invalid_symbol:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_thorin_relocation_with_invalid_symbol"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_thorin_row_not_in_index` from `codegen_ssa`"]
    pub const codegen_ssa_thorin_row_not_in_index: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_thorin_row_not_in_index"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_thorin_section_not_in_row` from `codegen_ssa`"]
    pub const codegen_ssa_thorin_section_not_in_row: rustc_errors::DiagMessage
        =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_thorin_section_not_in_row"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_thorin_section_without_name` from `codegen_ssa`"]
    pub const codegen_ssa_thorin_section_without_name:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_thorin_section_without_name"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_thorin_str_at_offset` from `codegen_ssa`"]
    pub const codegen_ssa_thorin_str_at_offset: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_thorin_str_at_offset"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_thorin_top_level_die_not_unit` from `codegen_ssa`"]
    pub const codegen_ssa_thorin_top_level_die_not_unit:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_thorin_top_level_die_not_unit"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_thorin_unit_not_in_index` from `codegen_ssa`"]
    pub const codegen_ssa_thorin_unit_not_in_index: rustc_errors::DiagMessage
        =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_thorin_unit_not_in_index"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_thorin_unsupported_relocation` from `codegen_ssa`"]
    pub const codegen_ssa_thorin_unsupported_relocation:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_thorin_unsupported_relocation"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_unable_to_exe_linker` from `codegen_ssa`"]
    pub const codegen_ssa_unable_to_exe_linker: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_unable_to_exe_linker"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_unable_to_exe_linker.command_note` from `codegen_ssa`"]
    pub const codegen_ssa_command_note: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("command_note"));
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_unable_to_run` from `codegen_ssa`"]
    pub const codegen_ssa_unable_to_run: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_unable_to_run"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_unable_to_run_dsymutil` from `codegen_ssa`"]
    pub const codegen_ssa_unable_to_run_dsymutil: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_unable_to_run_dsymutil"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_unable_to_write_debugger_visualizer` from `codegen_ssa`"]
    pub const codegen_ssa_unable_to_write_debugger_visualizer:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_unable_to_write_debugger_visualizer"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_unknown_archive_kind` from `codegen_ssa`"]
    pub const codegen_ssa_unknown_archive_kind: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_unknown_archive_kind"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_unknown_ctarget_feature` from `codegen_ssa`"]
    pub const codegen_ssa_unknown_ctarget_feature: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_unknown_ctarget_feature"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_unknown_ctarget_feature.possible_feature` from `codegen_ssa`"]
    pub const codegen_ssa_possible_feature: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("possible_feature"));
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_unknown_ctarget_feature.consider_filing_feature_request` from `codegen_ssa`"]
    pub const codegen_ssa_consider_filing_feature_request:
        rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("consider_filing_feature_request"));
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_unknown_ctarget_feature_prefix` from `codegen_ssa`"]
    pub const codegen_ssa_unknown_ctarget_feature_prefix:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_unknown_ctarget_feature_prefix"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_unknown_reuse_kind` from `codegen_ssa`"]
    pub const codegen_ssa_unknown_reuse_kind: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_unknown_reuse_kind"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_unstable_ctarget_feature` from `codegen_ssa`"]
    pub const codegen_ssa_unstable_ctarget_feature: rustc_errors::DiagMessage
        =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_unstable_ctarget_feature"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_unsupported_link_self_contained` from `codegen_ssa`"]
    pub const codegen_ssa_unsupported_link_self_contained:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_unsupported_link_self_contained"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_use_cargo_directive` from `codegen_ssa`"]
    pub const codegen_ssa_use_cargo_directive: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_use_cargo_directive"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_version_script_write_failure` from `codegen_ssa`"]
    pub const codegen_ssa_version_script_write_failure:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_version_script_write_failure"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_visual_studio_not_installed` from `codegen_ssa`"]
    pub const codegen_ssa_visual_studio_not_installed:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_visual_studio_not_installed"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_xcrun_about` from `codegen_ssa`"]
    pub const codegen_ssa_xcrun_about: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_xcrun_about"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_xcrun_command_line_tools_insufficient` from `codegen_ssa`"]
    pub const codegen_ssa_xcrun_command_line_tools_insufficient:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_xcrun_command_line_tools_insufficient"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_xcrun_failed_invoking` from `codegen_ssa`"]
    pub const codegen_ssa_xcrun_failed_invoking: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_xcrun_failed_invoking"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_xcrun_found_developer_dir` from `codegen_ssa`"]
    pub const codegen_ssa_xcrun_found_developer_dir: rustc_errors::DiagMessage
        =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_xcrun_found_developer_dir"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_xcrun_no_developer_dir` from `codegen_ssa`"]
    pub const codegen_ssa_xcrun_no_developer_dir: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_xcrun_no_developer_dir"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_xcrun_sdk_path_warning` from `codegen_ssa`"]
    pub const codegen_ssa_xcrun_sdk_path_warning: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_xcrun_sdk_path_warning"),
            None);
    #[doc =
    "Constant referring to Fluent message `codegen_ssa_xcrun_unsuccessful` from `codegen_ssa`"]
    pub const codegen_ssa_xcrun_unsuccessful: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("codegen_ssa_xcrun_unsuccessful"),
            None);
    #[doc =
    r" Constants expected to exist by the diagnostic derive macros to use as default Fluent"]
    #[doc = r" identifiers for different subdiagnostic kinds."]
    pub mod _subdiag {
        #[doc = r" Default for `#[help]`"]
        pub const help: rustc_errors::SubdiagMessage =
            rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("help"));
        #[doc = r" Default for `#[note]`"]
        pub const note: rustc_errors::SubdiagMessage =
            rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("note"));
        #[doc = r" Default for `#[warn]`"]
        pub const warn: rustc_errors::SubdiagMessage =
            rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("warn"));
        #[doc = r" Default for `#[label]`"]
        pub const label: rustc_errors::SubdiagMessage =
            rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("label"));
        #[doc = r" Default for `#[suggestion]`"]
        pub const suggestion: rustc_errors::SubdiagMessage =
            rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("suggestion"));
    }
}rustc_fluent_macro::fluent_messages! { "../messages.ftl" }
59
60pub struct ModuleCodegen<M> {
61    /// The name of the module. When the crate may be saved between
62    /// compilations, incremental compilation requires that name be
63    /// unique amongst **all** crates. Therefore, it should contain
64    /// something unique to this crate (e.g., a module path) as well
65    /// as the crate name and disambiguator.
66    /// We currently generate these names via CodegenUnit::build_cgu_name().
67    pub name: String,
68    pub module_llvm: M,
69    pub kind: ModuleKind,
70    /// Saving the ThinLTO buffer for embedding in the object file.
71    pub thin_lto_buffer: Option<Vec<u8>>,
72}
73
74impl<M> ModuleCodegen<M> {
75    pub fn new_regular(name: impl Into<String>, module: M) -> Self {
76        Self {
77            name: name.into(),
78            module_llvm: module,
79            kind: ModuleKind::Regular,
80            thin_lto_buffer: None,
81        }
82    }
83
84    pub fn new_allocator(name: impl Into<String>, module: M) -> Self {
85        Self {
86            name: name.into(),
87            module_llvm: module,
88            kind: ModuleKind::Allocator,
89            thin_lto_buffer: None,
90        }
91    }
92
93    pub fn into_compiled_module(
94        self,
95        emit_obj: bool,
96        emit_dwarf_obj: bool,
97        emit_bc: bool,
98        emit_asm: bool,
99        emit_ir: bool,
100        outputs: &OutputFilenames,
101        invocation_temp: Option<&str>,
102    ) -> CompiledModule {
103        let object = emit_obj
104            .then(|| outputs.temp_path_for_cgu(OutputType::Object, &self.name, invocation_temp));
105        let dwarf_object =
106            emit_dwarf_obj.then(|| outputs.temp_path_dwo_for_cgu(&self.name, invocation_temp));
107        let bytecode = emit_bc
108            .then(|| outputs.temp_path_for_cgu(OutputType::Bitcode, &self.name, invocation_temp));
109        let assembly = emit_asm
110            .then(|| outputs.temp_path_for_cgu(OutputType::Assembly, &self.name, invocation_temp));
111        let llvm_ir = emit_ir.then(|| {
112            outputs.temp_path_for_cgu(OutputType::LlvmAssembly, &self.name, invocation_temp)
113        });
114
115        CompiledModule {
116            name: self.name,
117            kind: self.kind,
118            object,
119            dwarf_object,
120            bytecode,
121            assembly,
122            llvm_ir,
123            links_from_incr_cache: Vec::new(),
124        }
125    }
126}
127
128#[derive(#[automatically_derived]
impl ::core::fmt::Debug for CompiledModule {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["name", "kind", "object", "dwarf_object", "bytecode",
                        "assembly", "llvm_ir", "links_from_incr_cache"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.name, &self.kind, &self.object, &self.dwarf_object,
                        &self.bytecode, &self.assembly, &self.llvm_ir,
                        &&self.links_from_incr_cache];
        ::core::fmt::Formatter::debug_struct_fields_finish(f,
            "CompiledModule", names, values)
    }
}Debug, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for CompiledModule {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    CompiledModule {
                        name: ref __binding_0,
                        kind: ref __binding_1,
                        object: ref __binding_2,
                        dwarf_object: ref __binding_3,
                        bytecode: ref __binding_4,
                        assembly: ref __binding_5,
                        llvm_ir: ref __binding_6,
                        links_from_incr_cache: ref __binding_7 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_4,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_5,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_6,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_7,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for CompiledModule {
            fn decode(__decoder: &mut __D) -> Self {
                CompiledModule {
                    name: ::rustc_serialize::Decodable::decode(__decoder),
                    kind: ::rustc_serialize::Decodable::decode(__decoder),
                    object: ::rustc_serialize::Decodable::decode(__decoder),
                    dwarf_object: ::rustc_serialize::Decodable::decode(__decoder),
                    bytecode: ::rustc_serialize::Decodable::decode(__decoder),
                    assembly: ::rustc_serialize::Decodable::decode(__decoder),
                    llvm_ir: ::rustc_serialize::Decodable::decode(__decoder),
                    links_from_incr_cache: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable)]
129pub struct CompiledModule {
130    pub name: String,
131    pub kind: ModuleKind,
132    pub object: Option<PathBuf>,
133    pub dwarf_object: Option<PathBuf>,
134    pub bytecode: Option<PathBuf>,
135    pub assembly: Option<PathBuf>, // --emit=asm
136    pub llvm_ir: Option<PathBuf>,  // --emit=llvm-ir, llvm-bc is in bytecode
137    pub links_from_incr_cache: Vec<PathBuf>,
138}
139
140impl CompiledModule {
141    /// Call `emit` function with every artifact type currently compiled
142    pub fn for_each_output(&self, mut emit: impl FnMut(&Path, OutputType)) {
143        if let Some(path) = self.object.as_deref() {
144            emit(path, OutputType::Object);
145        }
146        if let Some(path) = self.bytecode.as_deref() {
147            emit(path, OutputType::Bitcode);
148        }
149        if let Some(path) = self.llvm_ir.as_deref() {
150            emit(path, OutputType::LlvmAssembly);
151        }
152        if let Some(path) = self.assembly.as_deref() {
153            emit(path, OutputType::Assembly);
154        }
155    }
156}
157
158pub(crate) struct CachedModuleCodegen {
159    pub name: String,
160    pub source: WorkProduct,
161}
162
163#[derive(#[automatically_derived]
impl ::core::marker::Copy for ModuleKind { }Copy, #[automatically_derived]
impl ::core::clone::Clone for ModuleKind {
    #[inline]
    fn clone(&self) -> ModuleKind { *self }
}Clone, #[automatically_derived]
impl ::core::fmt::Debug for ModuleKind {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::write_str(f,
            match self {
                ModuleKind::Regular => "Regular",
                ModuleKind::Allocator => "Allocator",
            })
    }
}Debug, #[automatically_derived]
impl ::core::cmp::PartialEq for ModuleKind {
    #[inline]
    fn eq(&self, other: &ModuleKind) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr
    }
}PartialEq, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for ModuleKind {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        ModuleKind::Regular => { 0usize }
                        ModuleKind::Allocator => { 1usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    ModuleKind::Regular => {}
                    ModuleKind::Allocator => {}
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for ModuleKind {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => { ModuleKind::Regular }
                    1usize => { ModuleKind::Allocator }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `ModuleKind`, expected 0..2, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable)]
164pub enum ModuleKind {
165    Regular,
166    Allocator,
167}
168
169pub struct MemFlags(<MemFlags as
    ::bitflags::__private::PublicFlags>::Internal);
#[automatically_derived]
impl ::core::fmt::Debug for MemFlags {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_tuple_field1_finish(f, "MemFlags",
            &&self.0)
    }
}
#[automatically_derived]
#[doc(hidden)]
unsafe impl ::core::clone::TrivialClone for MemFlags { }
#[automatically_derived]
impl ::core::clone::Clone for MemFlags {
    #[inline]
    fn clone(&self) -> MemFlags {
        let _:
                ::core::clone::AssertParamIsClone<<MemFlags as
                ::bitflags::__private::PublicFlags>::Internal>;
        *self
    }
}
#[automatically_derived]
impl ::core::marker::Copy for MemFlags { }
#[automatically_derived]
impl ::core::marker::StructuralPartialEq for MemFlags { }
#[automatically_derived]
impl ::core::cmp::PartialEq for MemFlags {
    #[inline]
    fn eq(&self, other: &MemFlags) -> bool { self.0 == other.0 }
}
#[automatically_derived]
impl ::core::cmp::Eq for MemFlags {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_receiver_is_total_eq(&self) {
        let _:
                ::core::cmp::AssertParamIsEq<<MemFlags as
                ::bitflags::__private::PublicFlags>::Internal>;
    }
}
impl MemFlags {
    #[allow(deprecated, non_upper_case_globals,)]
    pub const VOLATILE: Self = Self::from_bits_retain(1 << 0);
    #[allow(deprecated, non_upper_case_globals,)]
    pub const NONTEMPORAL: Self = Self::from_bits_retain(1 << 1);
    #[allow(deprecated, non_upper_case_globals,)]
    pub const UNALIGNED: Self = Self::from_bits_retain(1 << 2);
}
impl ::bitflags::Flags for MemFlags {
    const FLAGS: &'static [::bitflags::Flag<MemFlags>] =
        &[{

                        #[allow(deprecated, non_upper_case_globals,)]
                        ::bitflags::Flag::new("VOLATILE", MemFlags::VOLATILE)
                    },
                    {

                        #[allow(deprecated, non_upper_case_globals,)]
                        ::bitflags::Flag::new("NONTEMPORAL", MemFlags::NONTEMPORAL)
                    },
                    {

                        #[allow(deprecated, non_upper_case_globals,)]
                        ::bitflags::Flag::new("UNALIGNED", MemFlags::UNALIGNED)
                    }];
    type Bits = u8;
    fn bits(&self) -> u8 { MemFlags::bits(self) }
    fn from_bits_retain(bits: u8) -> MemFlags {
        MemFlags::from_bits_retain(bits)
    }
}
#[allow(dead_code, deprecated, unused_doc_comments, unused_attributes,
unused_mut, unused_imports, non_upper_case_globals, clippy ::
assign_op_pattern, clippy :: indexing_slicing, clippy :: same_name_method,
clippy :: iter_without_into_iter,)]
const _: () =
    {
        #[repr(transparent)]
        pub struct InternalBitFlags(u8);
        #[automatically_derived]
        #[doc(hidden)]
        unsafe impl ::core::clone::TrivialClone for InternalBitFlags { }
        #[automatically_derived]
        impl ::core::clone::Clone for InternalBitFlags {
            #[inline]
            fn clone(&self) -> InternalBitFlags {
                let _: ::core::clone::AssertParamIsClone<u8>;
                *self
            }
        }
        #[automatically_derived]
        impl ::core::marker::Copy for InternalBitFlags { }
        #[automatically_derived]
        impl ::core::marker::StructuralPartialEq for InternalBitFlags { }
        #[automatically_derived]
        impl ::core::cmp::PartialEq for InternalBitFlags {
            #[inline]
            fn eq(&self, other: &InternalBitFlags) -> bool {
                self.0 == other.0
            }
        }
        #[automatically_derived]
        impl ::core::cmp::Eq for InternalBitFlags {
            #[inline]
            #[doc(hidden)]
            #[coverage(off)]
            fn assert_receiver_is_total_eq(&self) {
                let _: ::core::cmp::AssertParamIsEq<u8>;
            }
        }
        #[automatically_derived]
        impl ::core::cmp::PartialOrd for InternalBitFlags {
            #[inline]
            fn partial_cmp(&self, other: &InternalBitFlags)
                -> ::core::option::Option<::core::cmp::Ordering> {
                ::core::cmp::PartialOrd::partial_cmp(&self.0, &other.0)
            }
        }
        #[automatically_derived]
        impl ::core::cmp::Ord for InternalBitFlags {
            #[inline]
            fn cmp(&self, other: &InternalBitFlags) -> ::core::cmp::Ordering {
                ::core::cmp::Ord::cmp(&self.0, &other.0)
            }
        }
        #[automatically_derived]
        impl ::core::hash::Hash for InternalBitFlags {
            #[inline]
            fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
                ::core::hash::Hash::hash(&self.0, state)
            }
        }
        impl ::bitflags::__private::PublicFlags for MemFlags {
            type Primitive = u8;
            type Internal = InternalBitFlags;
        }
        impl ::bitflags::__private::core::default::Default for
            InternalBitFlags {
            #[inline]
            fn default() -> Self { InternalBitFlags::empty() }
        }
        impl ::bitflags::__private::core::fmt::Debug for InternalBitFlags {
            fn fmt(&self,
                f: &mut ::bitflags::__private::core::fmt::Formatter<'_>)
                -> ::bitflags::__private::core::fmt::Result {
                if self.is_empty() {
                    f.write_fmt(format_args!("{0:#x}",
                            <u8 as ::bitflags::Bits>::EMPTY))
                } else {
                    ::bitflags::__private::core::fmt::Display::fmt(self, f)
                }
            }
        }
        impl ::bitflags::__private::core::fmt::Display for InternalBitFlags {
            fn fmt(&self,
                f: &mut ::bitflags::__private::core::fmt::Formatter<'_>)
                -> ::bitflags::__private::core::fmt::Result {
                ::bitflags::parser::to_writer(&MemFlags(*self), f)
            }
        }
        impl ::bitflags::__private::core::str::FromStr for InternalBitFlags {
            type Err = ::bitflags::parser::ParseError;
            fn from_str(s: &str)
                ->
                    ::bitflags::__private::core::result::Result<Self,
                    Self::Err> {
                ::bitflags::parser::from_str::<MemFlags>(s).map(|flags|
                        flags.0)
            }
        }
        impl ::bitflags::__private::core::convert::AsRef<u8> for
            InternalBitFlags {
            fn as_ref(&self) -> &u8 { &self.0 }
        }
        impl ::bitflags::__private::core::convert::From<u8> for
            InternalBitFlags {
            fn from(bits: u8) -> Self { Self::from_bits_retain(bits) }
        }
        #[allow(dead_code, deprecated, unused_attributes)]
        impl InternalBitFlags {
            /// Get a flags value with all bits unset.
            #[inline]
            pub const fn empty() -> Self {
                Self(<u8 as ::bitflags::Bits>::EMPTY)
            }
            /// Get a flags value with all known bits set.
            #[inline]
            pub const fn all() -> Self {
                let mut truncated = <u8 as ::bitflags::Bits>::EMPTY;
                let mut i = 0;
                {
                    {
                        let flag =
                            <MemFlags as ::bitflags::Flags>::FLAGS[i].value().bits();
                        truncated = truncated | flag;
                        i += 1;
                    }
                };
                {
                    {
                        let flag =
                            <MemFlags as ::bitflags::Flags>::FLAGS[i].value().bits();
                        truncated = truncated | flag;
                        i += 1;
                    }
                };
                {
                    {
                        let flag =
                            <MemFlags as ::bitflags::Flags>::FLAGS[i].value().bits();
                        truncated = truncated | flag;
                        i += 1;
                    }
                };
                let _ = i;
                Self(truncated)
            }
            /// Get the underlying bits value.
            ///
            /// The returned value is exactly the bits set in this flags value.
            #[inline]
            pub const fn bits(&self) -> u8 { self.0 }
            /// Convert from a bits value.
            ///
            /// This method will return `None` if any unknown bits are set.
            #[inline]
            pub const fn from_bits(bits: u8)
                -> ::bitflags::__private::core::option::Option<Self> {
                let truncated = Self::from_bits_truncate(bits).0;
                if truncated == bits {
                    ::bitflags::__private::core::option::Option::Some(Self(bits))
                } else { ::bitflags::__private::core::option::Option::None }
            }
            /// Convert from a bits value, unsetting any unknown bits.
            #[inline]
            pub const fn from_bits_truncate(bits: u8) -> Self {
                Self(bits & Self::all().0)
            }
            /// Convert from a bits value exactly.
            #[inline]
            pub const fn from_bits_retain(bits: u8) -> Self { Self(bits) }
            /// Get a flags value with the bits of a flag with the given name set.
            ///
            /// This method will return `None` if `name` is empty or doesn't
            /// correspond to any named flag.
            #[inline]
            pub fn from_name(name: &str)
                -> ::bitflags::__private::core::option::Option<Self> {
                {
                    if name == "VOLATILE" {
                        return ::bitflags::__private::core::option::Option::Some(Self(MemFlags::VOLATILE.bits()));
                    }
                };
                ;
                {
                    if name == "NONTEMPORAL" {
                        return ::bitflags::__private::core::option::Option::Some(Self(MemFlags::NONTEMPORAL.bits()));
                    }
                };
                ;
                {
                    if name == "UNALIGNED" {
                        return ::bitflags::__private::core::option::Option::Some(Self(MemFlags::UNALIGNED.bits()));
                    }
                };
                ;
                let _ = name;
                ::bitflags::__private::core::option::Option::None
            }
            /// Whether all bits in this flags value are unset.
            #[inline]
            pub const fn is_empty(&self) -> bool {
                self.0 == <u8 as ::bitflags::Bits>::EMPTY
            }
            /// Whether all known bits in this flags value are set.
            #[inline]
            pub const fn is_all(&self) -> bool {
                Self::all().0 | self.0 == self.0
            }
            /// Whether any set bits in a source flags value are also set in a target flags value.
            #[inline]
            pub const fn intersects(&self, other: Self) -> bool {
                self.0 & other.0 != <u8 as ::bitflags::Bits>::EMPTY
            }
            /// Whether all set bits in a source flags value are also set in a target flags value.
            #[inline]
            pub const fn contains(&self, other: Self) -> bool {
                self.0 & other.0 == other.0
            }
            /// The bitwise or (`|`) of the bits in two flags values.
            #[inline]
            pub fn insert(&mut self, other: Self) {
                *self = Self(self.0).union(other);
            }
            /// The intersection of a source flags value with the complement of a target flags
            /// value (`&!`).
            ///
            /// This method is not equivalent to `self & !other` when `other` has unknown bits set.
            /// `remove` won't truncate `other`, but the `!` operator will.
            #[inline]
            pub fn remove(&mut self, other: Self) {
                *self = Self(self.0).difference(other);
            }
            /// The bitwise exclusive-or (`^`) of the bits in two flags values.
            #[inline]
            pub fn toggle(&mut self, other: Self) {
                *self = Self(self.0).symmetric_difference(other);
            }
            /// Call `insert` when `value` is `true` or `remove` when `value` is `false`.
            #[inline]
            pub fn set(&mut self, other: Self, value: bool) {
                if value { self.insert(other); } else { self.remove(other); }
            }
            /// The bitwise and (`&`) of the bits in two flags values.
            #[inline]
            #[must_use]
            pub const fn intersection(self, other: Self) -> Self {
                Self(self.0 & other.0)
            }
            /// The bitwise or (`|`) of the bits in two flags values.
            #[inline]
            #[must_use]
            pub const fn union(self, other: Self) -> Self {
                Self(self.0 | other.0)
            }
            /// The intersection of a source flags value with the complement of a target flags
            /// value (`&!`).
            ///
            /// This method is not equivalent to `self & !other` when `other` has unknown bits set.
            /// `difference` won't truncate `other`, but the `!` operator will.
            #[inline]
            #[must_use]
            pub const fn difference(self, other: Self) -> Self {
                Self(self.0 & !other.0)
            }
            /// The bitwise exclusive-or (`^`) of the bits in two flags values.
            #[inline]
            #[must_use]
            pub const fn symmetric_difference(self, other: Self) -> Self {
                Self(self.0 ^ other.0)
            }
            /// The bitwise negation (`!`) of the bits in a flags value, truncating the result.
            #[inline]
            #[must_use]
            pub const fn complement(self) -> Self {
                Self::from_bits_truncate(!self.0)
            }
        }
        impl ::bitflags::__private::core::fmt::Binary for InternalBitFlags {
            fn fmt(&self, f: &mut ::bitflags::__private::core::fmt::Formatter)
                -> ::bitflags::__private::core::fmt::Result {
                let inner = self.0;
                ::bitflags::__private::core::fmt::Binary::fmt(&inner, f)
            }
        }
        impl ::bitflags::__private::core::fmt::Octal for InternalBitFlags {
            fn fmt(&self, f: &mut ::bitflags::__private::core::fmt::Formatter)
                -> ::bitflags::__private::core::fmt::Result {
                let inner = self.0;
                ::bitflags::__private::core::fmt::Octal::fmt(&inner, f)
            }
        }
        impl ::bitflags::__private::core::fmt::LowerHex for InternalBitFlags {
            fn fmt(&self, f: &mut ::bitflags::__private::core::fmt::Formatter)
                -> ::bitflags::__private::core::fmt::Result {
                let inner = self.0;
                ::bitflags::__private::core::fmt::LowerHex::fmt(&inner, f)
            }
        }
        impl ::bitflags::__private::core::fmt::UpperHex for InternalBitFlags {
            fn fmt(&self, f: &mut ::bitflags::__private::core::fmt::Formatter)
                -> ::bitflags::__private::core::fmt::Result {
                let inner = self.0;
                ::bitflags::__private::core::fmt::UpperHex::fmt(&inner, f)
            }
        }
        impl ::bitflags::__private::core::ops::BitOr for InternalBitFlags {
            type Output = Self;
            /// The bitwise or (`|`) of the bits in two flags values.
            #[inline]
            fn bitor(self, other: InternalBitFlags) -> Self {
                self.union(other)
            }
        }
        impl ::bitflags::__private::core::ops::BitOrAssign for
            InternalBitFlags {
            /// The bitwise or (`|`) of the bits in two flags values.
            #[inline]
            fn bitor_assign(&mut self, other: Self) { self.insert(other); }
        }
        impl ::bitflags::__private::core::ops::BitXor for InternalBitFlags {
            type Output = Self;
            /// The bitwise exclusive-or (`^`) of the bits in two flags values.
            #[inline]
            fn bitxor(self, other: Self) -> Self {
                self.symmetric_difference(other)
            }
        }
        impl ::bitflags::__private::core::ops::BitXorAssign for
            InternalBitFlags {
            /// The bitwise exclusive-or (`^`) of the bits in two flags values.
            #[inline]
            fn bitxor_assign(&mut self, other: Self) { self.toggle(other); }
        }
        impl ::bitflags::__private::core::ops::BitAnd for InternalBitFlags {
            type Output = Self;
            /// The bitwise and (`&`) of the bits in two flags values.
            #[inline]
            fn bitand(self, other: Self) -> Self { self.intersection(other) }
        }
        impl ::bitflags::__private::core::ops::BitAndAssign for
            InternalBitFlags {
            /// The bitwise and (`&`) of the bits in two flags values.
            #[inline]
            fn bitand_assign(&mut self, other: Self) {
                *self =
                    Self::from_bits_retain(self.bits()).intersection(other);
            }
        }
        impl ::bitflags::__private::core::ops::Sub for InternalBitFlags {
            type Output = Self;
            /// The intersection of a source flags value with the complement of a target flags value (`&!`).
            ///
            /// This method is not equivalent to `self & !other` when `other` has unknown bits set.
            /// `difference` won't truncate `other`, but the `!` operator will.
            #[inline]
            fn sub(self, other: Self) -> Self { self.difference(other) }
        }
        impl ::bitflags::__private::core::ops::SubAssign for InternalBitFlags
            {
            /// The intersection of a source flags value with the complement of a target flags value (`&!`).
            ///
            /// This method is not equivalent to `self & !other` when `other` has unknown bits set.
            /// `difference` won't truncate `other`, but the `!` operator will.
            #[inline]
            fn sub_assign(&mut self, other: Self) { self.remove(other); }
        }
        impl ::bitflags::__private::core::ops::Not for InternalBitFlags {
            type Output = Self;
            /// The bitwise negation (`!`) of the bits in a flags value, truncating the result.
            #[inline]
            fn not(self) -> Self { self.complement() }
        }
        impl ::bitflags::__private::core::iter::Extend<InternalBitFlags> for
            InternalBitFlags {
            /// The bitwise or (`|`) of the bits in each flags value.
            fn extend<T: ::bitflags::__private::core::iter::IntoIterator<Item
                = Self>>(&mut self, iterator: T) {
                for item in iterator { self.insert(item) }
            }
        }
        impl ::bitflags::__private::core::iter::FromIterator<InternalBitFlags>
            for InternalBitFlags {
            /// The bitwise or (`|`) of the bits in each flags value.
            fn from_iter<T: ::bitflags::__private::core::iter::IntoIterator<Item
                = Self>>(iterator: T) -> Self {
                use ::bitflags::__private::core::iter::Extend;
                let mut result = Self::empty();
                result.extend(iterator);
                result
            }
        }
        impl InternalBitFlags {
            /// Yield a set of contained flags values.
            ///
            /// Each yielded flags value will correspond to a defined named flag. Any unknown bits
            /// will be yielded together as a final flags value.
            #[inline]
            pub const fn iter(&self) -> ::bitflags::iter::Iter<MemFlags> {
                ::bitflags::iter::Iter::__private_const_new(<MemFlags as
                        ::bitflags::Flags>::FLAGS,
                    MemFlags::from_bits_retain(self.bits()),
                    MemFlags::from_bits_retain(self.bits()))
            }
            /// Yield a set of contained named flags values.
            ///
            /// This method is like [`iter`](#method.iter), except only yields bits in contained named flags.
            /// Any unknown bits, or bits not corresponding to a contained flag will not be yielded.
            #[inline]
            pub const fn iter_names(&self)
                -> ::bitflags::iter::IterNames<MemFlags> {
                ::bitflags::iter::IterNames::__private_const_new(<MemFlags as
                        ::bitflags::Flags>::FLAGS,
                    MemFlags::from_bits_retain(self.bits()),
                    MemFlags::from_bits_retain(self.bits()))
            }
        }
        impl ::bitflags::__private::core::iter::IntoIterator for
            InternalBitFlags {
            type Item = MemFlags;
            type IntoIter = ::bitflags::iter::Iter<MemFlags>;
            fn into_iter(self) -> Self::IntoIter { self.iter() }
        }
        impl InternalBitFlags {
            /// Returns a mutable reference to the raw value of the flags currently stored.
            #[inline]
            pub fn bits_mut(&mut self) -> &mut u8 { &mut self.0 }
        }
        #[allow(dead_code, deprecated, unused_attributes)]
        impl MemFlags {
            /// Get a flags value with all bits unset.
            #[inline]
            pub const fn empty() -> Self { Self(InternalBitFlags::empty()) }
            /// Get a flags value with all known bits set.
            #[inline]
            pub const fn all() -> Self { Self(InternalBitFlags::all()) }
            /// Get the underlying bits value.
            ///
            /// The returned value is exactly the bits set in this flags value.
            #[inline]
            pub const fn bits(&self) -> u8 { self.0.bits() }
            /// Convert from a bits value.
            ///
            /// This method will return `None` if any unknown bits are set.
            #[inline]
            pub const fn from_bits(bits: u8)
                -> ::bitflags::__private::core::option::Option<Self> {
                match InternalBitFlags::from_bits(bits) {
                    ::bitflags::__private::core::option::Option::Some(bits) =>
                        ::bitflags::__private::core::option::Option::Some(Self(bits)),
                    ::bitflags::__private::core::option::Option::None =>
                        ::bitflags::__private::core::option::Option::None,
                }
            }
            /// Convert from a bits value, unsetting any unknown bits.
            #[inline]
            pub const fn from_bits_truncate(bits: u8) -> Self {
                Self(InternalBitFlags::from_bits_truncate(bits))
            }
            /// Convert from a bits value exactly.
            #[inline]
            pub const fn from_bits_retain(bits: u8) -> Self {
                Self(InternalBitFlags::from_bits_retain(bits))
            }
            /// Get a flags value with the bits of a flag with the given name set.
            ///
            /// This method will return `None` if `name` is empty or doesn't
            /// correspond to any named flag.
            #[inline]
            pub fn from_name(name: &str)
                -> ::bitflags::__private::core::option::Option<Self> {
                match InternalBitFlags::from_name(name) {
                    ::bitflags::__private::core::option::Option::Some(bits) =>
                        ::bitflags::__private::core::option::Option::Some(Self(bits)),
                    ::bitflags::__private::core::option::Option::None =>
                        ::bitflags::__private::core::option::Option::None,
                }
            }
            /// Whether all bits in this flags value are unset.
            #[inline]
            pub const fn is_empty(&self) -> bool { self.0.is_empty() }
            /// Whether all known bits in this flags value are set.
            #[inline]
            pub const fn is_all(&self) -> bool { self.0.is_all() }
            /// Whether any set bits in a source flags value are also set in a target flags value.
            #[inline]
            pub const fn intersects(&self, other: Self) -> bool {
                self.0.intersects(other.0)
            }
            /// Whether all set bits in a source flags value are also set in a target flags value.
            #[inline]
            pub const fn contains(&self, other: Self) -> bool {
                self.0.contains(other.0)
            }
            /// The bitwise or (`|`) of the bits in two flags values.
            #[inline]
            pub fn insert(&mut self, other: Self) { self.0.insert(other.0) }
            /// The intersection of a source flags value with the complement of a target flags
            /// value (`&!`).
            ///
            /// This method is not equivalent to `self & !other` when `other` has unknown bits set.
            /// `remove` won't truncate `other`, but the `!` operator will.
            #[inline]
            pub fn remove(&mut self, other: Self) { self.0.remove(other.0) }
            /// The bitwise exclusive-or (`^`) of the bits in two flags values.
            #[inline]
            pub fn toggle(&mut self, other: Self) { self.0.toggle(other.0) }
            /// Call `insert` when `value` is `true` or `remove` when `value` is `false`.
            #[inline]
            pub fn set(&mut self, other: Self, value: bool) {
                self.0.set(other.0, value)
            }
            /// The bitwise and (`&`) of the bits in two flags values.
            #[inline]
            #[must_use]
            pub const fn intersection(self, other: Self) -> Self {
                Self(self.0.intersection(other.0))
            }
            /// The bitwise or (`|`) of the bits in two flags values.
            #[inline]
            #[must_use]
            pub const fn union(self, other: Self) -> Self {
                Self(self.0.union(other.0))
            }
            /// The intersection of a source flags value with the complement of a target flags
            /// value (`&!`).
            ///
            /// This method is not equivalent to `self & !other` when `other` has unknown bits set.
            /// `difference` won't truncate `other`, but the `!` operator will.
            #[inline]
            #[must_use]
            pub const fn difference(self, other: Self) -> Self {
                Self(self.0.difference(other.0))
            }
            /// The bitwise exclusive-or (`^`) of the bits in two flags values.
            #[inline]
            #[must_use]
            pub const fn symmetric_difference(self, other: Self) -> Self {
                Self(self.0.symmetric_difference(other.0))
            }
            /// The bitwise negation (`!`) of the bits in a flags value, truncating the result.
            #[inline]
            #[must_use]
            pub const fn complement(self) -> Self {
                Self(self.0.complement())
            }
        }
        impl ::bitflags::__private::core::fmt::Binary for MemFlags {
            fn fmt(&self, f: &mut ::bitflags::__private::core::fmt::Formatter)
                -> ::bitflags::__private::core::fmt::Result {
                let inner = self.0;
                ::bitflags::__private::core::fmt::Binary::fmt(&inner, f)
            }
        }
        impl ::bitflags::__private::core::fmt::Octal for MemFlags {
            fn fmt(&self, f: &mut ::bitflags::__private::core::fmt::Formatter)
                -> ::bitflags::__private::core::fmt::Result {
                let inner = self.0;
                ::bitflags::__private::core::fmt::Octal::fmt(&inner, f)
            }
        }
        impl ::bitflags::__private::core::fmt::LowerHex for MemFlags {
            fn fmt(&self, f: &mut ::bitflags::__private::core::fmt::Formatter)
                -> ::bitflags::__private::core::fmt::Result {
                let inner = self.0;
                ::bitflags::__private::core::fmt::LowerHex::fmt(&inner, f)
            }
        }
        impl ::bitflags::__private::core::fmt::UpperHex for MemFlags {
            fn fmt(&self, f: &mut ::bitflags::__private::core::fmt::Formatter)
                -> ::bitflags::__private::core::fmt::Result {
                let inner = self.0;
                ::bitflags::__private::core::fmt::UpperHex::fmt(&inner, f)
            }
        }
        impl ::bitflags::__private::core::ops::BitOr for MemFlags {
            type Output = Self;
            /// The bitwise or (`|`) of the bits in two flags values.
            #[inline]
            fn bitor(self, other: MemFlags) -> Self { self.union(other) }
        }
        impl ::bitflags::__private::core::ops::BitOrAssign for MemFlags {
            /// The bitwise or (`|`) of the bits in two flags values.
            #[inline]
            fn bitor_assign(&mut self, other: Self) { self.insert(other); }
        }
        impl ::bitflags::__private::core::ops::BitXor for MemFlags {
            type Output = Self;
            /// The bitwise exclusive-or (`^`) of the bits in two flags values.
            #[inline]
            fn bitxor(self, other: Self) -> Self {
                self.symmetric_difference(other)
            }
        }
        impl ::bitflags::__private::core::ops::BitXorAssign for MemFlags {
            /// The bitwise exclusive-or (`^`) of the bits in two flags values.
            #[inline]
            fn bitxor_assign(&mut self, other: Self) { self.toggle(other); }
        }
        impl ::bitflags::__private::core::ops::BitAnd for MemFlags {
            type Output = Self;
            /// The bitwise and (`&`) of the bits in two flags values.
            #[inline]
            fn bitand(self, other: Self) -> Self { self.intersection(other) }
        }
        impl ::bitflags::__private::core::ops::BitAndAssign for MemFlags {
            /// The bitwise and (`&`) of the bits in two flags values.
            #[inline]
            fn bitand_assign(&mut self, other: Self) {
                *self =
                    Self::from_bits_retain(self.bits()).intersection(other);
            }
        }
        impl ::bitflags::__private::core::ops::Sub for MemFlags {
            type Output = Self;
            /// The intersection of a source flags value with the complement of a target flags value (`&!`).
            ///
            /// This method is not equivalent to `self & !other` when `other` has unknown bits set.
            /// `difference` won't truncate `other`, but the `!` operator will.
            #[inline]
            fn sub(self, other: Self) -> Self { self.difference(other) }
        }
        impl ::bitflags::__private::core::ops::SubAssign for MemFlags {
            /// The intersection of a source flags value with the complement of a target flags value (`&!`).
            ///
            /// This method is not equivalent to `self & !other` when `other` has unknown bits set.
            /// `difference` won't truncate `other`, but the `!` operator will.
            #[inline]
            fn sub_assign(&mut self, other: Self) { self.remove(other); }
        }
        impl ::bitflags::__private::core::ops::Not for MemFlags {
            type Output = Self;
            /// The bitwise negation (`!`) of the bits in a flags value, truncating the result.
            #[inline]
            fn not(self) -> Self { self.complement() }
        }
        impl ::bitflags::__private::core::iter::Extend<MemFlags> for MemFlags
            {
            /// The bitwise or (`|`) of the bits in each flags value.
            fn extend<T: ::bitflags::__private::core::iter::IntoIterator<Item
                = Self>>(&mut self, iterator: T) {
                for item in iterator { self.insert(item) }
            }
        }
        impl ::bitflags::__private::core::iter::FromIterator<MemFlags> for
            MemFlags {
            /// The bitwise or (`|`) of the bits in each flags value.
            fn from_iter<T: ::bitflags::__private::core::iter::IntoIterator<Item
                = Self>>(iterator: T) -> Self {
                use ::bitflags::__private::core::iter::Extend;
                let mut result = Self::empty();
                result.extend(iterator);
                result
            }
        }
        impl MemFlags {
            /// Yield a set of contained flags values.
            ///
            /// Each yielded flags value will correspond to a defined named flag. Any unknown bits
            /// will be yielded together as a final flags value.
            #[inline]
            pub const fn iter(&self) -> ::bitflags::iter::Iter<MemFlags> {
                ::bitflags::iter::Iter::__private_const_new(<MemFlags as
                        ::bitflags::Flags>::FLAGS,
                    MemFlags::from_bits_retain(self.bits()),
                    MemFlags::from_bits_retain(self.bits()))
            }
            /// Yield a set of contained named flags values.
            ///
            /// This method is like [`iter`](#method.iter), except only yields bits in contained named flags.
            /// Any unknown bits, or bits not corresponding to a contained flag will not be yielded.
            #[inline]
            pub const fn iter_names(&self)
                -> ::bitflags::iter::IterNames<MemFlags> {
                ::bitflags::iter::IterNames::__private_const_new(<MemFlags as
                        ::bitflags::Flags>::FLAGS,
                    MemFlags::from_bits_retain(self.bits()),
                    MemFlags::from_bits_retain(self.bits()))
            }
        }
        impl ::bitflags::__private::core::iter::IntoIterator for MemFlags {
            type Item = MemFlags;
            type IntoIter = ::bitflags::iter::Iter<MemFlags>;
            fn into_iter(self) -> Self::IntoIter { self.iter() }
        }
    };bitflags::bitflags! {
170    #[derive(Debug, Clone, Copy, PartialEq, Eq)]
171    pub struct MemFlags: u8 {
172        const VOLATILE = 1 << 0;
173        const NONTEMPORAL = 1 << 1;
174        const UNALIGNED = 1 << 2;
175    }
176}
177
178#[derive(#[automatically_derived]
impl ::core::clone::Clone for NativeLib {
    #[inline]
    fn clone(&self) -> NativeLib {
        NativeLib {
            kind: ::core::clone::Clone::clone(&self.kind),
            name: ::core::clone::Clone::clone(&self.name),
            filename: ::core::clone::Clone::clone(&self.filename),
            cfg: ::core::clone::Clone::clone(&self.cfg),
            verbatim: ::core::clone::Clone::clone(&self.verbatim),
            dll_imports: ::core::clone::Clone::clone(&self.dll_imports),
        }
    }
}Clone, #[automatically_derived]
impl ::core::fmt::Debug for NativeLib {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["kind", "name", "filename", "cfg", "verbatim", "dll_imports"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.kind, &self.name, &self.filename, &self.cfg,
                        &self.verbatim, &&self.dll_imports];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "NativeLib",
            names, values)
    }
}Debug, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for NativeLib {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    NativeLib {
                        kind: ref __binding_0,
                        name: ref __binding_1,
                        filename: ref __binding_2,
                        cfg: ref __binding_3,
                        verbatim: ref __binding_4,
                        dll_imports: ref __binding_5 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_4,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_5,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for NativeLib {
            fn decode(__decoder: &mut __D) -> Self {
                NativeLib {
                    kind: ::rustc_serialize::Decodable::decode(__decoder),
                    name: ::rustc_serialize::Decodable::decode(__decoder),
                    filename: ::rustc_serialize::Decodable::decode(__decoder),
                    cfg: ::rustc_serialize::Decodable::decode(__decoder),
                    verbatim: ::rustc_serialize::Decodable::decode(__decoder),
                    dll_imports: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, const _: () =
    {
        impl<'__ctx>
            ::rustc_data_structures::stable_hasher::HashStable<::rustc_query_system::ich::StableHashingContext<'__ctx>>
            for NativeLib {
            #[inline]
            fn hash_stable(&self,
                __hcx:
                    &mut ::rustc_query_system::ich::StableHashingContext<'__ctx>,
                __hasher:
                    &mut ::rustc_data_structures::stable_hasher::StableHasher) {
                match *self {
                    NativeLib {
                        kind: ref __binding_0,
                        name: ref __binding_1,
                        filename: ref __binding_2,
                        cfg: ref __binding_3,
                        verbatim: ref __binding_4,
                        dll_imports: ref __binding_5 } => {
                        { __binding_0.hash_stable(__hcx, __hasher); }
                        { __binding_1.hash_stable(__hcx, __hasher); }
                        { __binding_2.hash_stable(__hcx, __hasher); }
                        { __binding_3.hash_stable(__hcx, __hasher); }
                        { __binding_4.hash_stable(__hcx, __hasher); }
                        { __binding_5.hash_stable(__hcx, __hasher); }
                    }
                }
            }
        }
    };HashStable)]
179pub struct NativeLib {
180    pub kind: NativeLibKind,
181    pub name: Symbol,
182    pub filename: Option<Symbol>,
183    pub cfg: Option<CfgEntry>,
184    pub verbatim: bool,
185    pub dll_imports: Vec<cstore::DllImport>,
186}
187
188impl From<&cstore::NativeLib> for NativeLib {
189    fn from(lib: &cstore::NativeLib) -> Self {
190        NativeLib {
191            kind: lib.kind,
192            filename: lib.filename,
193            name: lib.name,
194            cfg: lib.cfg.clone(),
195            verbatim: lib.verbatim.unwrap_or(false),
196            dll_imports: lib.dll_imports.clone(),
197        }
198    }
199}
200
201/// Misc info we load from metadata to persist beyond the tcx.
202///
203/// Note: though `CrateNum` is only meaningful within the same tcx, information within `CrateInfo`
204/// is self-contained. `CrateNum` can be viewed as a unique identifier within a `CrateInfo`, where
205/// `used_crate_source` contains all `CrateSource` of the dependents, and maintains a mapping from
206/// identifiers (`CrateNum`) to `CrateSource`. The other fields map `CrateNum` to the crate's own
207/// additional properties, so that effectively we can retrieve each dependent crate's `CrateSource`
208/// and the corresponding properties without referencing information outside of a `CrateInfo`.
209#[derive(#[automatically_derived]
impl ::core::fmt::Debug for CrateInfo {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["target_cpu", "target_features", "crate_types",
                        "exported_symbols", "linked_symbols", "local_crate_name",
                        "compiler_builtins", "profiler_runtime", "is_no_builtins",
                        "native_libraries", "crate_name", "used_libraries",
                        "used_crate_source", "used_crates", "dependency_formats",
                        "windows_subsystem", "natvis_debugger_visualizers",
                        "lint_levels", "metadata_symbol"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.target_cpu, &self.target_features, &self.crate_types,
                        &self.exported_symbols, &self.linked_symbols,
                        &self.local_crate_name, &self.compiler_builtins,
                        &self.profiler_runtime, &self.is_no_builtins,
                        &self.native_libraries, &self.crate_name,
                        &self.used_libraries, &self.used_crate_source,
                        &self.used_crates, &self.dependency_formats,
                        &self.windows_subsystem, &self.natvis_debugger_visualizers,
                        &self.lint_levels, &&self.metadata_symbol];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "CrateInfo",
            names, values)
    }
}Debug, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for CrateInfo {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    CrateInfo {
                        target_cpu: ref __binding_0,
                        target_features: ref __binding_1,
                        crate_types: ref __binding_2,
                        exported_symbols: ref __binding_3,
                        linked_symbols: ref __binding_4,
                        local_crate_name: ref __binding_5,
                        compiler_builtins: ref __binding_6,
                        profiler_runtime: ref __binding_7,
                        is_no_builtins: ref __binding_8,
                        native_libraries: ref __binding_9,
                        crate_name: ref __binding_10,
                        used_libraries: ref __binding_11,
                        used_crate_source: ref __binding_12,
                        used_crates: ref __binding_13,
                        dependency_formats: ref __binding_14,
                        windows_subsystem: ref __binding_15,
                        natvis_debugger_visualizers: ref __binding_16,
                        lint_levels: ref __binding_17,
                        metadata_symbol: ref __binding_18 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_4,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_5,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_6,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_7,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_8,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_9,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_10,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_11,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_12,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_13,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_14,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_15,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_16,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_17,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_18,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for CrateInfo {
            fn decode(__decoder: &mut __D) -> Self {
                CrateInfo {
                    target_cpu: ::rustc_serialize::Decodable::decode(__decoder),
                    target_features: ::rustc_serialize::Decodable::decode(__decoder),
                    crate_types: ::rustc_serialize::Decodable::decode(__decoder),
                    exported_symbols: ::rustc_serialize::Decodable::decode(__decoder),
                    linked_symbols: ::rustc_serialize::Decodable::decode(__decoder),
                    local_crate_name: ::rustc_serialize::Decodable::decode(__decoder),
                    compiler_builtins: ::rustc_serialize::Decodable::decode(__decoder),
                    profiler_runtime: ::rustc_serialize::Decodable::decode(__decoder),
                    is_no_builtins: ::rustc_serialize::Decodable::decode(__decoder),
                    native_libraries: ::rustc_serialize::Decodable::decode(__decoder),
                    crate_name: ::rustc_serialize::Decodable::decode(__decoder),
                    used_libraries: ::rustc_serialize::Decodable::decode(__decoder),
                    used_crate_source: ::rustc_serialize::Decodable::decode(__decoder),
                    used_crates: ::rustc_serialize::Decodable::decode(__decoder),
                    dependency_formats: ::rustc_serialize::Decodable::decode(__decoder),
                    windows_subsystem: ::rustc_serialize::Decodable::decode(__decoder),
                    natvis_debugger_visualizers: ::rustc_serialize::Decodable::decode(__decoder),
                    lint_levels: ::rustc_serialize::Decodable::decode(__decoder),
                    metadata_symbol: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable)]
210pub struct CrateInfo {
211    pub target_cpu: String,
212    pub target_features: Vec<String>,
213    pub crate_types: Vec<CrateType>,
214    pub exported_symbols: UnordMap<CrateType, Vec<(String, SymbolExportKind)>>,
215    pub linked_symbols: FxIndexMap<CrateType, Vec<(String, SymbolExportKind)>>,
216    pub local_crate_name: Symbol,
217    pub compiler_builtins: Option<CrateNum>,
218    pub profiler_runtime: Option<CrateNum>,
219    pub is_no_builtins: FxHashSet<CrateNum>,
220    pub native_libraries: FxIndexMap<CrateNum, Vec<NativeLib>>,
221    pub crate_name: UnordMap<CrateNum, Symbol>,
222    pub used_libraries: Vec<NativeLib>,
223    pub used_crate_source: UnordMap<CrateNum, Arc<CrateSource>>,
224    pub used_crates: Vec<CrateNum>,
225    pub dependency_formats: Arc<Dependencies>,
226    pub windows_subsystem: Option<WindowsSubsystemKind>,
227    pub natvis_debugger_visualizers: BTreeSet<DebuggerVisualizerFile>,
228    pub lint_levels: CodegenLintLevels,
229    pub metadata_symbol: String,
230}
231
232/// Target-specific options that get set in `cfg(...)`.
233///
234/// RUSTC_SPECIFIC_FEATURES should be skipped here, those are handled outside codegen.
235pub struct TargetConfig {
236    /// Options to be set in `cfg(target_features)`.
237    pub target_features: Vec<Symbol>,
238    /// Options to be set in `cfg(target_features)`, but including unstable features.
239    pub unstable_target_features: Vec<Symbol>,
240    /// Option for `cfg(target_has_reliable_f16)`, true if `f16` basic arithmetic works.
241    pub has_reliable_f16: bool,
242    /// Option for `cfg(target_has_reliable_f16_math)`, true if `f16` math calls work.
243    pub has_reliable_f16_math: bool,
244    /// Option for `cfg(target_has_reliable_f128)`, true if `f128` basic arithmetic works.
245    pub has_reliable_f128: bool,
246    /// Option for `cfg(target_has_reliable_f128_math)`, true if `f128` math calls work.
247    pub has_reliable_f128_math: bool,
248}
249
250#[derive(const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for CodegenResults {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    CodegenResults {
                        modules: ref __binding_0,
                        allocator_module: ref __binding_1,
                        crate_info: ref __binding_2 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for CodegenResults {
            fn decode(__decoder: &mut __D) -> Self {
                CodegenResults {
                    modules: ::rustc_serialize::Decodable::decode(__decoder),
                    allocator_module: ::rustc_serialize::Decodable::decode(__decoder),
                    crate_info: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable)]
251pub struct CodegenResults {
252    pub modules: Vec<CompiledModule>,
253    pub allocator_module: Option<CompiledModule>,
254    pub crate_info: CrateInfo,
255}
256
257pub enum CodegenErrors {
258    WrongFileType,
259    EmptyVersionNumber,
260    EncodingVersionMismatch { version_array: String, rlink_version: u32 },
261    RustcVersionMismatch { rustc_version: String },
262    CorruptFile,
263}
264
265pub fn provide(providers: &mut Providers) {
266    crate::back::symbol_export::provide(providers);
267    crate::base::provide(&mut providers.queries);
268    crate::target_features::provide(&mut providers.queries);
269    crate::codegen_attrs::provide(&mut providers.queries);
270    providers.queries.global_backend_features = |_tcx: TyCtxt<'_>, ()| ::alloc::vec::Vec::new()vec![];
271}
272
273/// Checks if the given filename ends with the `.rcgu.o` extension that `rustc`
274/// uses for the object files it generates.
275pub fn looks_like_rust_object_file(filename: &str) -> bool {
276    let path = Path::new(filename);
277    let ext = path.extension().and_then(|s| s.to_str());
278    if ext != Some(OutputType::Object.extension()) {
279        // The file name does not end with ".o", so it can't be an object file.
280        return false;
281    }
282
283    // Strip the ".o" at the end
284    let ext2 = path.file_stem().and_then(|s| Path::new(s).extension()).and_then(|s| s.to_str());
285
286    // Check if the "inner" extension
287    ext2 == Some(RUST_CGU_EXT)
288}
289
290const RLINK_VERSION: u32 = 1;
291const RLINK_MAGIC: &[u8] = b"rustlink";
292
293impl CodegenResults {
294    pub fn serialize_rlink(
295        sess: &Session,
296        rlink_file: &Path,
297        codegen_results: &CodegenResults,
298        metadata: &EncodedMetadata,
299        outputs: &OutputFilenames,
300    ) -> Result<usize, io::Error> {
301        let mut encoder = FileEncoder::new(rlink_file)?;
302        encoder.emit_raw_bytes(RLINK_MAGIC);
303        // `emit_raw_bytes` is used to make sure that the version representation does not depend on
304        // Encoder's inner representation of `u32`.
305        encoder.emit_raw_bytes(&RLINK_VERSION.to_be_bytes());
306        encoder.emit_str(sess.cfg_version);
307        Encodable::encode(codegen_results, &mut encoder);
308        Encodable::encode(metadata, &mut encoder);
309        Encodable::encode(outputs, &mut encoder);
310        encoder.finish().map_err(|(_path, err)| err)
311    }
312
313    pub fn deserialize_rlink(
314        sess: &Session,
315        data: Vec<u8>,
316    ) -> Result<(Self, EncodedMetadata, OutputFilenames), CodegenErrors> {
317        // The Decodable machinery is not used here because it panics if the input data is invalid
318        // and because its internal representation may change.
319        if !data.starts_with(RLINK_MAGIC) {
320            return Err(CodegenErrors::WrongFileType);
321        }
322        let data = &data[RLINK_MAGIC.len()..];
323        if data.len() < 4 {
324            return Err(CodegenErrors::EmptyVersionNumber);
325        }
326
327        let mut version_array: [u8; 4] = Default::default();
328        version_array.copy_from_slice(&data[..4]);
329        if u32::from_be_bytes(version_array) != RLINK_VERSION {
330            return Err(CodegenErrors::EncodingVersionMismatch {
331                version_array: String::from_utf8_lossy(&version_array).to_string(),
332                rlink_version: RLINK_VERSION,
333            });
334        }
335
336        let Ok(mut decoder) = MemDecoder::new(&data[4..], 0) else {
337            return Err(CodegenErrors::CorruptFile);
338        };
339        let rustc_version = decoder.read_str();
340        if rustc_version != sess.cfg_version {
341            return Err(CodegenErrors::RustcVersionMismatch {
342                rustc_version: rustc_version.to_string(),
343            });
344        }
345
346        let codegen_results = CodegenResults::decode(&mut decoder);
347        let metadata = EncodedMetadata::decode(&mut decoder);
348        let outputs = OutputFilenames::decode(&mut decoder);
349        Ok((codegen_results, metadata, outputs))
350    }
351}
352
353/// A list of lint levels used in codegen.
354///
355/// When using `-Z link-only`, we don't have access to the tcx and must work
356/// solely from the `.rlink` file. `Lint`s are defined too early to be encodeable.
357/// Instead, encode exactly the information we need.
358#[derive(#[automatically_derived]
impl ::core::marker::Copy for CodegenLintLevels { }Copy, #[automatically_derived]
impl ::core::clone::Clone for CodegenLintLevels {
    #[inline]
    fn clone(&self) -> CodegenLintLevels {
        let _: ::core::clone::AssertParamIsClone<LevelAndSource>;
        *self
    }
}Clone, #[automatically_derived]
impl ::core::fmt::Debug for CodegenLintLevels {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field1_finish(f,
            "CodegenLintLevels", "linker_messages", &&self.linker_messages)
    }
}Debug, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for CodegenLintLevels {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    CodegenLintLevels { linker_messages: ref __binding_0 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for CodegenLintLevels {
            fn decode(__decoder: &mut __D) -> Self {
                CodegenLintLevels {
                    linker_messages: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable)]
359pub struct CodegenLintLevels {
360    linker_messages: LevelAndSource,
361}
362
363impl CodegenLintLevels {
364    pub fn from_tcx(tcx: TyCtxt<'_>) -> Self {
365        Self { linker_messages: tcx.lint_level_at_node(LINKER_MESSAGES, CRATE_HIR_ID) }
366    }
367}