Struct rustc_codegen_ssa::CrateInfo
source · pub struct CrateInfo {Show 16 fields
pub target_cpu: String,
pub crate_types: Vec<CrateType>,
pub exported_symbols: UnordMap<CrateType, Vec<String>>,
pub linked_symbols: FxIndexMap<CrateType, Vec<(String, SymbolExportKind)>>,
pub local_crate_name: Symbol,
pub compiler_builtins: Option<CrateNum>,
pub profiler_runtime: Option<CrateNum>,
pub is_no_builtins: FxHashSet<CrateNum>,
pub native_libraries: FxIndexMap<CrateNum, Vec<NativeLib>>,
pub crate_name: UnordMap<CrateNum, Symbol>,
pub used_libraries: Vec<NativeLib>,
pub used_crate_source: UnordMap<CrateNum, Lrc<CrateSource>>,
pub used_crates: Vec<CrateNum>,
pub dependency_formats: Lrc<Dependencies>,
pub windows_subsystem: Option<String>,
pub natvis_debugger_visualizers: BTreeSet<DebuggerVisualizerFile>,
}
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§
§target_cpu: String
§crate_types: Vec<CrateType>
§exported_symbols: UnordMap<CrateType, Vec<String>>
§linked_symbols: FxIndexMap<CrateType, Vec<(String, SymbolExportKind)>>
§local_crate_name: Symbol
§compiler_builtins: Option<CrateNum>
§profiler_runtime: Option<CrateNum>
§is_no_builtins: FxHashSet<CrateNum>
§native_libraries: FxIndexMap<CrateNum, Vec<NativeLib>>
§crate_name: UnordMap<CrateNum, Symbol>
§used_libraries: Vec<NativeLib>
§used_crate_source: UnordMap<CrateNum, Lrc<CrateSource>>
§used_crates: Vec<CrateNum>
§dependency_formats: Lrc<Dependencies>
§windows_subsystem: Option<String>
§natvis_debugger_visualizers: BTreeSet<DebuggerVisualizerFile>
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CrateInfo
impl !RefUnwindSafe for CrateInfo
impl !Send for CrateInfo
impl !Sync for CrateInfo
impl Unpin for CrateInfo
impl !UnwindSafe for CrateInfo
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
source§impl<T> Filterable for T
impl<T> Filterable for T
source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<P> IntoQueryParam<P> for P
impl<P> IntoQueryParam<P> for P
fn into_query_param(self) -> P
source§impl<T> MaybeResult<T> for T
impl<T> MaybeResult<T> for T
source§impl<I, T, U> Upcast<I, U> for Twhere
U: UpcastFrom<I, T>,
impl<I, T, U> Upcast<I, U> for Twhere
U: UpcastFrom<I, T>,
source§impl<I, T> UpcastFrom<I, T> for T
impl<I, T> UpcastFrom<I, T> for T
fn upcast_from(from: T, _tcx: I) -> T
source§impl<Tcx, T> Value<Tcx> for Twhere
Tcx: DepContext,
impl<Tcx, T> Value<Tcx> for Twhere
Tcx: DepContext,
default fn from_cycle_error( tcx: Tcx, cycle_error: &CycleError, _guar: ErrorGuaranteed, ) -> T
source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<'a, T> Captures<'a> for Twhere
T: ?Sized,
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> MaybeSendSync for T
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 408 bytes