File tree 3 files changed +9
-9
lines changed
3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ extern crate test;
7
7
8
8
use self :: miri:: eval_main;
9
9
use rustc:: hir:: def_id:: LOCAL_CRATE ;
10
- use rustc_interface:: interface;
10
+ use rustc_interface:: { interface, Queries } ;
11
11
use rustc_driver:: Compilation ;
12
12
use crate :: test:: Bencher ;
13
13
@@ -16,10 +16,10 @@ struct MiriCompilerCalls<'a> {
16
16
}
17
17
18
18
impl rustc_driver:: Callbacks for MiriCompilerCalls < ' _ > {
19
- fn after_analysis ( & mut self , compiler : & interface:: Compiler ) -> Compilation {
19
+ fn after_analysis < ' tcx > ( & mut self , compiler : & interface:: Compiler , queries : & ' tcx Queries < ' tcx > ) -> Compilation {
20
20
compiler. session ( ) . abort_if_errors ( ) ;
21
21
22
- compiler . global_ctxt ( ) . unwrap ( ) . peek_mut ( ) . enter ( |tcx| {
22
+ queries . global_ctxt ( ) . unwrap ( ) . peek_mut ( ) . enter ( |tcx| {
23
23
let ( entry_def_id, _) = tcx. entry_fn ( LOCAL_CRATE ) . expect (
24
24
"no main or start function found" ,
25
25
) ;
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ use std::sync::{Mutex, Arc};
15
15
use std:: io;
16
16
17
17
18
- use rustc_interface:: interface;
18
+ use rustc_interface:: { interface, Queries } ;
19
19
use rustc:: hir:: { self , itemlikevisit} ;
20
20
use rustc:: ty:: TyCtxt ;
21
21
use rustc:: hir:: def_id:: LOCAL_CRATE ;
@@ -29,9 +29,9 @@ struct MiriCompilerCalls {
29
29
}
30
30
31
31
impl rustc_driver:: Callbacks for MiriCompilerCalls {
32
- fn after_analysis ( & mut self , compiler : & interface:: Compiler ) -> Compilation {
32
+ fn after_analysis < ' tcx > ( & mut self , compiler : & interface:: Compiler , queries : & ' tcx Queries < ' tcx > ) -> Compilation {
33
33
compiler. session ( ) . abort_if_errors ( ) ;
34
- compiler . global_ctxt ( ) . unwrap ( ) . peek_mut ( ) . enter ( |tcx| {
34
+ queries . global_ctxt ( ) . unwrap ( ) . peek_mut ( ) . enter ( |tcx| {
35
35
if std:: env:: args ( ) . any ( |arg| arg == "--test" ) {
36
36
struct Visitor < ' tcx > ( TyCtxt < ' tcx > ) ;
37
37
impl < ' tcx , ' hir > itemlikevisit:: ItemLikeVisitor < ' hir > for Visitor < ' tcx > {
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ use std::env;
20
20
21
21
use hex:: FromHexError ;
22
22
23
- use rustc_interface:: interface;
23
+ use rustc_interface:: { interface, Queries } ;
24
24
use rustc:: hir:: def_id:: LOCAL_CRATE ;
25
25
use rustc_driver:: Compilation ;
26
26
@@ -29,11 +29,11 @@ struct MiriCompilerCalls {
29
29
}
30
30
31
31
impl rustc_driver:: Callbacks for MiriCompilerCalls {
32
- fn after_analysis ( & mut self , compiler : & interface:: Compiler ) -> Compilation {
32
+ fn after_analysis < ' tcx > ( & mut self , compiler : & interface:: Compiler , queries : & ' tcx Queries < ' tcx > ) -> Compilation {
33
33
init_late_loggers ( ) ;
34
34
compiler. session ( ) . abort_if_errors ( ) ;
35
35
36
- compiler . global_ctxt ( ) . unwrap ( ) . peek_mut ( ) . enter ( |tcx| {
36
+ queries . global_ctxt ( ) . unwrap ( ) . peek_mut ( ) . enter ( |tcx| {
37
37
let ( entry_def_id, _) = tcx. entry_fn ( LOCAL_CRATE ) . expect ( "no main function found!" ) ;
38
38
let mut config = self . miri_config . clone ( ) ;
39
39
You can’t perform that action at this time.
0 commit comments