Trait rustc_driver::CompilerCalls[][src]

pub trait CompilerCalls<'a> {
    fn build_controller(
        self: Box<Self>,
        _: &Session,
        _: &Matches
    ) -> CompileController<'a>; fn early_callback(
        &mut self,
        _: &Matches,
        _: &Options,
        _: &CrateConfig,
        _: &Registry,
        _: ErrorOutputType
    ) -> Compilation { ... }
fn late_callback(
        &mut self,
        _: &CodegenBackend,
        _: &Matches,
        _: &Session,
        _: &CrateStore,
        _: &Input,
        _: &Option<PathBuf>,
        _: &Option<PathBuf>
    ) -> Compilation { ... }
fn some_input(
        &mut self,
        input: Input,
        input_path: Option<PathBuf>
    ) -> (Input, Option<PathBuf>) { ... }
fn no_input(
        &mut self,
        _: &Matches,
        _: &Options,
        _: &CrateConfig,
        _: &Option<PathBuf>,
        _: &Option<PathBuf>,
        _: &Registry
    ) -> Option<(Input, Option<PathBuf>)> { ... } }
🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

A trait for customising the compilation process. Offers a number of hooks for executing custom code or customising input.

Required Methods

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Provided Methods

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Hook for a callback early in the process of handling arguments. This will be called straight after options have been parsed but before anything else (e.g., selecting input and output).

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Hook for a callback late in the process of handling arguments. This will be called just before actual compilation starts (and before build_controller is called), after all arguments etc. have been completely handled.

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Called after we extract the input from the arguments. Gives the implementer an opportunity to change the inputs or to add some custom input handling. The default behaviour is to simply pass through the inputs.

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Called after we extract the input from the arguments if there is no valid input. Gives the implementer an opportunity to supply alternate input (by returning a Some value) or to add custom behaviour for this error such as emitting error messages. Returning None will cause compilation to stop at this point.

Implementors