fix for GlobalCtxt changes
This commit is contained in:
parent
392d745699
commit
a971b8a2ae
3 changed files with 9 additions and 9 deletions
|
|
@ -7,7 +7,7 @@ extern crate test;
|
|||
|
||||
use self::miri::eval_main;
|
||||
use rustc::hir::def_id::LOCAL_CRATE;
|
||||
use rustc_interface::interface;
|
||||
use rustc_interface::{interface, Queries};
|
||||
use rustc_driver::Compilation;
|
||||
use crate::test::Bencher;
|
||||
|
||||
|
|
@ -16,10 +16,10 @@ struct MiriCompilerCalls<'a> {
|
|||
}
|
||||
|
||||
impl rustc_driver::Callbacks for MiriCompilerCalls<'_> {
|
||||
fn after_analysis(&mut self, compiler: &interface::Compiler) -> Compilation {
|
||||
fn after_analysis<'tcx>(&mut self, compiler: &interface::Compiler, queries: &'tcx Queries<'tcx>) -> Compilation {
|
||||
compiler.session().abort_if_errors();
|
||||
|
||||
compiler.global_ctxt().unwrap().peek_mut().enter(|tcx| {
|
||||
queries.global_ctxt().unwrap().peek_mut().enter(|tcx| {
|
||||
let (entry_def_id, _) = tcx.entry_fn(LOCAL_CRATE).expect(
|
||||
"no main or start function found",
|
||||
);
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ use std::sync::{Mutex, Arc};
|
|||
use std::io;
|
||||
|
||||
|
||||
use rustc_interface::interface;
|
||||
use rustc_interface::{interface, Queries};
|
||||
use rustc::hir::{self, itemlikevisit};
|
||||
use rustc::ty::TyCtxt;
|
||||
use rustc::hir::def_id::LOCAL_CRATE;
|
||||
|
|
@ -29,9 +29,9 @@ struct MiriCompilerCalls {
|
|||
}
|
||||
|
||||
impl rustc_driver::Callbacks for MiriCompilerCalls {
|
||||
fn after_analysis(&mut self, compiler: &interface::Compiler) -> Compilation {
|
||||
fn after_analysis<'tcx>(&mut self, compiler: &interface::Compiler, queries: &'tcx Queries<'tcx>) -> Compilation {
|
||||
compiler.session().abort_if_errors();
|
||||
compiler.global_ctxt().unwrap().peek_mut().enter(|tcx| {
|
||||
queries.global_ctxt().unwrap().peek_mut().enter(|tcx| {
|
||||
if std::env::args().any(|arg| arg == "--test") {
|
||||
struct Visitor<'tcx>(TyCtxt<'tcx>);
|
||||
impl<'tcx, 'hir> itemlikevisit::ItemLikeVisitor<'hir> for Visitor<'tcx> {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ use std::env;
|
|||
|
||||
use hex::FromHexError;
|
||||
|
||||
use rustc_interface::interface;
|
||||
use rustc_interface::{interface, Queries};
|
||||
use rustc::hir::def_id::LOCAL_CRATE;
|
||||
use rustc_driver::Compilation;
|
||||
|
||||
|
|
@ -29,11 +29,11 @@ struct MiriCompilerCalls {
|
|||
}
|
||||
|
||||
impl rustc_driver::Callbacks for MiriCompilerCalls {
|
||||
fn after_analysis(&mut self, compiler: &interface::Compiler) -> Compilation {
|
||||
fn after_analysis<'tcx>(&mut self, compiler: &interface::Compiler, queries: &'tcx Queries<'tcx>) -> Compilation {
|
||||
init_late_loggers();
|
||||
compiler.session().abort_if_errors();
|
||||
|
||||
compiler.global_ctxt().unwrap().peek_mut().enter(|tcx| {
|
||||
queries.global_ctxt().unwrap().peek_mut().enter(|tcx| {
|
||||
let (entry_def_id, _) = tcx.entry_fn(LOCAL_CRATE).expect("no main function found!");
|
||||
let mut config = self.miri_config.clone();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue