Struct rustc_codegen_ssa::CrateInfo[−][src]

pub struct CrateInfo {
Show fields pub panic_runtime: Option<CrateNum>, pub compiler_builtins: Option<CrateNum>, pub profiler_runtime: Option<CrateNum>, pub is_no_builtins: FxHashSet<CrateNum>, pub native_libraries: FxHashMap<CrateNum, Vec<NativeLib>>, pub crate_name: FxHashMap<CrateNum, String>, pub used_libraries: Vec<NativeLib>, pub used_crate_source: FxHashMap<CrateNum, Lrc<CrateSource>>, pub used_crates_static: Vec<(CrateNum, LibSource)>, pub used_crates_dynamic: Vec<(CrateNum, LibSource)>, pub lang_item_to_crate: FxHashMap<LangItem, CrateNum>, pub missing_lang_items: FxHashMap<CrateNum, Vec<LangItem>>, pub dependency_formats: Lrc<Dependencies>,
}
Expand description

Misc info we load from metadata to persist beyond the tcx.

Note: though CrateNum is only meaningful within the same tcx, information within CrateInfo is self-contained. CrateNum can be viewed as a unique identifier within a CrateInfo, where used_crate_source contains all CrateSource of the dependents, and maintains a mapping from identifiers (CrateNum) to CrateSource. The other fields map CrateNum to the crate’s own additional properties, so that effectively we can retrieve each dependent crate’s CrateSource and the corresponding properties without referencing information outside of a CrateInfo.

Fields

panic_runtime: Option<CrateNum>compiler_builtins: Option<CrateNum>profiler_runtime: Option<CrateNum>is_no_builtins: FxHashSet<CrateNum>native_libraries: FxHashMap<CrateNum, Vec<NativeLib>>crate_name: FxHashMap<CrateNum, String>used_libraries: Vec<NativeLib>used_crate_source: FxHashMap<CrateNum, Lrc<CrateSource>>used_crates_static: Vec<(CrateNum, LibSource)>used_crates_dynamic: Vec<(CrateNum, LibSource)>lang_item_to_crate: FxHashMap<LangItem, CrateNum>missing_lang_items: FxHashMap<CrateNum, Vec<LangItem>>dependency_formats: Lrc<Dependencies>

Implementations

impl CrateInfo[src]

pub fn new(tcx: TyCtxt<'_>) -> CrateInfo[src]

Trait Implementations

impl Debug for CrateInfo[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<__D: Decoder> Decodable<__D> for CrateInfo[src]

fn decode(__decoder: &mut __D) -> Result<Self, <__D as Decoder>::Error>[src]

impl<__E: Encoder> Encodable<__E> for CrateInfo[src]

fn encode(&self, __encoder: &mut __E) -> Result<(), <__E as Encoder>::Error>[src]

Auto Trait Implementations

impl !RefUnwindSafe for CrateInfo

impl !Send for CrateInfo

impl !Sync for CrateInfo

impl Unpin for CrateInfo

impl !UnwindSafe for CrateInfo

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized, 
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized, 
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized, 
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.