Skip to content

Commit

Permalink
Some more default implementations for the compiler driver callbacks.
Browse files Browse the repository at this point in the history
  • Loading branch information
nrc committed Jul 14, 2015
1 parent adcae00 commit 441b1c6
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/librustc_driver/lib.rs
Expand Up @@ -204,7 +204,9 @@ pub trait CompilerCalls<'a> {
fn early_callback(&mut self,
&getopts::Matches,
&diagnostics::registry::Registry)
-> Compilation;
-> Compilation {
Compilation::Continue
}

// Hook for a callback late in the process of handling arguments. This will
// be called just before actual compilation starts (and before build_controller
Expand All @@ -215,7 +217,9 @@ pub trait CompilerCalls<'a> {
&Input,
&Option<PathBuf>,
&Option<PathBuf>)
-> Compilation;
-> Compilation {
Compilation::Continue
}

// 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.
Expand All @@ -236,7 +240,9 @@ pub trait CompilerCalls<'a> {
&Option<PathBuf>,
&Option<PathBuf>,
&diagnostics::registry::Registry)
-> Option<(Input, Option<PathBuf>)>;
-> Option<(Input, Option<PathBuf>)> {
None
}

// Parse pretty printing information from the arguments. The implementer can
// choose to ignore this (the default will return None) which will skip pretty
Expand Down

0 comments on commit 441b1c6

Please sign in to comment.