pub struct Compiler {
    pub(crate) sess: Lrc<Session>,
    codegen_backend: Lrc<Box<dyn CodegenBackend>>,
    pub(crate) input: Input,
    pub(crate) input_path: Option<PathBuf>,
    pub(crate) output_dir: Option<PathBuf>,
    pub(crate) output_file: Option<PathBuf>,
    pub(crate) temps_dir: Option<PathBuf>,
    pub(crate) register_lints: Option<Box<dyn Fn(&Session, &mut LintStore) + Send + Sync>>,
    pub(crate) override_queries: Option<fn(_: &Session, _: &mut Providers, _: &mut ExternProviders)>,
Expand description

Represents a compiler session. Note that every Compiler contains a Session, but Compiler also contains some things that cannot be in Session, due to Session being in a crate that has many fewer dependencies than this crate.

Can be used to run rustc_interface queries. Created by passing Config to run_compiler.


§sess: Lrc<Session>§codegen_backend: Lrc<Box<dyn CodegenBackend>>§input: Input§input_path: Option<PathBuf>§output_dir: Option<PathBuf>§output_file: Option<PathBuf>§temps_dir: Option<PathBuf>§register_lints: Option<Box<dyn Fn(&Session, &mut LintStore) + Send + Sync>>§override_queries: Option<fn(_: &Session, _: &mut Providers, _: &mut ExternProviders)>


Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.


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: 216 bytes