Skip to main content

Compiled

Struct Compiled 

Source
pub struct Compiled {
    pub artifact: Artifact,
    pub messages: Vec<String>,
    pub errors: u32,
    pub fired: Fired,
    pub dumps: Vec<Dump>,
    pub remarks: String,
}
Expand description

What compiling one file produced.

Fields§

§artifact: Artifact

What to write, which is nothing when the compilation failed or produced nothing.

§messages: Vec<String>

The diagnostics, already rendered, one per element, in the order they were reported.

§errors: u32

How many of them were errors.

§fired: Fired

Which lowering rules this file fired, for -Zrule-coverage.

Empty for a compilation that stopped before the back end, which every kind up to and including --emit=ir does. That is not the same as a rule set nothing reaches and the caller unions these rather than reading one, so a file that fired nothing adds nothing.

§dumps: Vec<Dump>

What -fdump-ir= asked to see, in the order the passes ran.

The optimizer does not write files, because nothing below the driver in spec/18-package-layout.md knows what a file is, so the text comes back here and the caller decides where it goes.

§remarks: String

What -fopt-info asked to hear, already rendered, one remark per line.

Empty when the flag was not given, and also empty when it was given and no pass had anything of the kinds asked for to say. Those two are the same text and different facts, which is why a misspelled keyword is an error rather than a quiet nothing.

Implementations§

Source§

impl Compiled

Source

pub fn failed(&self) -> bool

Whether anything went wrong badly enough that the output should not be used.

Source

pub fn text(&self) -> &str

The text that was produced, and the empty string for anything that is not text.

A caller that asked for one of the text kinds knows which it asked for, so this saves it matching on a variant it has already ruled out.

Trait Implementations§

Source§

impl Clone for Compiled

Source§

fn clone(&self) -> Compiled

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Compiled

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Eq for Compiled

Source§

impl PartialEq for Compiled

Source§

fn eq(&self, other: &Compiled) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Compiled

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.