Auto merge of #847 - RalfJung:rustup, r=RalfJung
fix for rustc_driver change
This commit is contained in:
commit
f9dd11546e
@ -8,6 +8,7 @@ extern crate test;
|
||||
use self::miri::eval_main;
|
||||
use rustc::hir::def_id::LOCAL_CRATE;
|
||||
use rustc_interface::interface;
|
||||
use rustc_driver::Compilation;
|
||||
use crate::test::Bencher;
|
||||
|
||||
struct MiriCompilerCalls<'a> {
|
||||
@ -15,7 +16,7 @@ struct MiriCompilerCalls<'a> {
|
||||
}
|
||||
|
||||
impl rustc_driver::Callbacks for MiriCompilerCalls<'_> {
|
||||
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| {
|
||||
@ -31,8 +32,7 @@ impl rustc_driver::Callbacks for MiriCompilerCalls<'_> {
|
||||
|
||||
compiler.session().abort_if_errors();
|
||||
|
||||
// Don't continue execution
|
||||
false
|
||||
Compilation::Stop
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1 +1 @@
|
||||
d36b7f69448f7390fa9dfde75d58b914365acdab
|
||||
527dce7137f7a3c7bf47d9a503abf25f88ea22de
|
||||
|
@ -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 }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -21,24 +21,24 @@ use hex::FromHexError;
|
||||
|
||||
use rustc_interface::interface;
|
||||
use rustc::hir::def_id::LOCAL_CRATE;
|
||||
use rustc_driver::Compilation;
|
||||
|
||||
struct MiriCompilerCalls {
|
||||
miri_config: miri::MiriConfig,
|
||||
}
|
||||
|
||||
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 {
|
||||
init_late_loggers();
|
||||
compiler.session().abort_if_errors();
|
||||
|
||||
@ -54,8 +54,7 @@ impl rustc_driver::Callbacks for MiriCompilerCalls {
|
||||
|
||||
compiler.session().abort_if_errors();
|
||||
|
||||
// Don't continue execution
|
||||
false
|
||||
Compilation::Stop
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user