Fix tests

This commit is contained in:
Nick Cameron 2016-04-21 17:28:25 +12:00
parent 52a2b33a4b
commit aaf56d7086
3 changed files with 11 additions and 3 deletions

View File

@ -447,7 +447,10 @@ impl<'a> CompilerCalls<'a> for RustcDefaultCalls {
.and_then(|| RustcDefaultCalls::list_metadata(sess, matches, input))
}
fn build_controller(&mut self, sess: &Session, matches: &getopts::Matches) -> CompileController<'a> {
fn build_controller(&mut self,
sess: &Session,
matches: &getopts::Matches)
-> CompileController<'a> {
let mut control = CompileController::basic();
if let Some((ppm, opt_uii)) = parse_pretty(sess, matches) {

View File

@ -949,7 +949,9 @@ fn print_with_analysis<'tcx, 'a: 'tcx>(sess: &'a Session,
});
match ppm {
PpmMir => write_mir_pretty(tcx, iter::once((&nodeid, mir)), &mut out),
PpmMirCFG => write_mir_graphviz(tcx, iter::once((&nodeid, mir)), &mut out),
PpmMirCFG => {
write_mir_graphviz(tcx, iter::once((&nodeid, mir)), &mut out)
}
_ => unreachable!(),
}?;
} else {

View File

@ -69,7 +69,10 @@ impl<'a> CompilerCalls<'a> for TestCalls {
panic!("This shouldn't happen");
}
fn build_controller(&mut self, _: &Session, _: &getopts::Matches) -> driver::CompileController<'a> {
fn build_controller(&mut self,
_: &Session,
_: &getopts::Matches)
-> driver::CompileController<'a> {
panic!("This shouldn't be called");
}
}