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>,
}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]
Trait Implementations
impl Debug for CrateInfo[src]
impl<__D: Decoder> Decodable<__D> for CrateInfo[src]
impl<__E: Encoder> Encodable<__E> for CrateInfo[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
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]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,