pub struct Compiler {
pub(crate) stage: u32,
pub(crate) host: TargetSelection,
pub(crate) forced_compiler: bool,
}Expand description
A structure representing a Rust compiler.
Each compiler has a stage that it is associated with and a host that
corresponds to the platform the compiler runs on.
Fields§
§stage: u32§host: TargetSelection§forced_compiler: boolIndicates whether the compiler was forced to use a specific stage.
This field is ignored in Hash and PartialEq implementations as only the stage
and host fields are relevant for those.
Implementations§
Source§impl Compiler
impl Compiler
pub(crate) fn new(stage: u32, host: TargetSelection) -> Self
pub(crate) fn forced_compiler(&mut self, forced_compiler: bool)
Sourcepub(crate) fn is_snapshot(&self, sess: &Session) -> bool
pub(crate) fn is_snapshot(&self, sess: &Session) -> bool
Returns true if this is a snapshot compiler for the session’s configuration
Sourcepub(crate) fn is_forced_compiler(&self) -> bool
pub(crate) fn is_forced_compiler(&self) -> bool
Indicates whether the compiler was forced to use a specific stage.
Trait Implementations§
impl Copy for Compiler
impl Eq for Compiler
Source§impl From<Compiler> for TargetAndStage
impl From<Compiler> for TargetAndStage
Source§impl Ord for Compiler
impl Ord for Compiler
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Auto Trait Implementations§
impl Freeze for Compiler
impl RefUnwindSafe for Compiler
impl Send for Compiler
impl Sync for Compiler
impl Unpin for Compiler
impl UnsafeUnpin for Compiler
impl UnwindSafe for Compiler
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Pointable for T
impl<T> Pointable 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: 40 bytes