pub struct Compiler {
pub(crate) stage: u32,
pub(crate) host: TargetSelection,
}
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. This structure is used as
a parameter to many methods below.
Fields§
§stage: u32
§host: TargetSelection
Implementations§
source§impl Compiler
impl Compiler
pub fn with_stage(self, stage: u32) -> Compiler
sourcepub fn is_snapshot(&self, build: &Build) -> bool
pub fn is_snapshot(&self, build: &Build) -> bool
Returns true
if this is a snapshot compiler for build
’s configuration
sourcepub fn is_final_stage(&self, build: &Build) -> bool
pub fn is_final_stage(&self, build: &Build) -> bool
Returns if this compiler should be treated as a final stage one in the
current build session.
This takes into account whether we’re performing a full bootstrap or
not; don’t directly compare the stage with 2
!
Trait Implementations§
source§impl Ord for Compiler
impl Ord for Compiler
source§impl PartialEq<Compiler> for Compiler
impl PartialEq<Compiler> for Compiler
source§impl PartialOrd<Compiler> for Compiler
impl PartialOrd<Compiler> for Compiler
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl Copy for Compiler
impl Eq for Compiler
impl StructuralEq for Compiler
impl StructuralPartialEq for Compiler
Auto Trait Implementations§
impl RefUnwindSafe for Compiler
impl Send for Compiler
impl Sync for Compiler
impl Unpin 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
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