diff --git a/src/bin/miri-rustc-tests.rs b/src/bin/miri-rustc-tests.rs index 9b0d02f4b7e2..dae5189937a3 100644 --- a/src/bin/miri-rustc-tests.rs +++ b/src/bin/miri-rustc-tests.rs @@ -19,6 +19,7 @@ use rustc_interface::interface; use rustc::hir::{self, itemlikevisit}; use rustc::ty::TyCtxt; use rustc::hir::def_id::LOCAL_CRATE; +use rustc_driver::Compilation; use miri::MiriConfig; @@ -28,18 +29,17 @@ struct MiriCompilerCalls { } impl rustc_driver::Callbacks for MiriCompilerCalls { - fn after_parsing(&mut self, compiler: &interface::Compiler) -> bool { + fn after_parsing(&mut self, compiler: &interface::Compiler) -> Compilation { let attr = ( syntax::symbol::Symbol::intern("miri"), syntax::feature_gate::AttributeType::Whitelisted, ); compiler.session().plugin_attributes.borrow_mut().push(attr); - // Continue execution - true + Compilation::Continue } - fn after_analysis(&mut self, compiler: &interface::Compiler) -> bool { + fn after_analysis(&mut self, compiler: &interface::Compiler) -> Compilation { compiler.session().abort_if_errors(); compiler.global_ctxt().unwrap().peek_mut().enter(|tcx| { if std::env::args().any(|arg| arg == "--test") { @@ -71,7 +71,7 @@ impl rustc_driver::Callbacks for MiriCompilerCalls { }); // Continue execution on host target - self.host_target + if self.host_target { Compilation::Continue } else { Compilation::Stop } } }