driver: Pass session options to CompilerCallbacks::early_callback()

This commit is contained in:
Kamal Marhubi 2016-02-08 15:43:01 -05:00
parent 601e04534f
commit 9951ac4be9
2 changed files with 8 additions and 1 deletions

View File

@ -164,7 +164,11 @@ pub fn run_compiler<'a>(args: &[String],
let descriptions = diagnostics_registry();
do_or_return!(callbacks.early_callback(&matches, &descriptions, sopts.error_format), None);
do_or_return!(callbacks.early_callback(&matches,
&sopts,
&descriptions,
sopts.error_format),
None);
let (odir, ofile) = make_output(&matches);
let (input, input_file_path) = match make_input(&matches.free) {
@ -251,6 +255,7 @@ pub trait CompilerCalls<'a> {
// else (e.g., selecting input and output).
fn early_callback(&mut self,
_: &getopts::Matches,
_: &config::Options,
_: &diagnostics::registry::Registry,
_: ErrorOutputType)
-> Compilation {
@ -327,6 +332,7 @@ pub struct RustcDefaultCalls;
impl<'a> CompilerCalls<'a> for RustcDefaultCalls {
fn early_callback(&mut self,
matches: &getopts::Matches,
_sopts: &config::Options,
descriptions: &diagnostics::registry::Registry,
output: ErrorOutputType)
-> Compilation {

View File

@ -34,6 +34,7 @@ struct TestCalls {
impl<'a> CompilerCalls<'a> for TestCalls {
fn early_callback(&mut self,
_: &getopts::Matches,
_: &config::Options,
_: &diagnostics::registry::Registry,
_: config::ErrorOutputType)
-> Compilation {