File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ use rustc_interface::interface;
19
19
use rustc:: hir:: { self , itemlikevisit} ;
20
20
use rustc:: ty:: TyCtxt ;
21
21
use rustc:: hir:: def_id:: LOCAL_CRATE ;
22
+ use rustc_driver:: Compilation ;
22
23
23
24
use miri:: MiriConfig ;
24
25
@@ -28,18 +29,17 @@ struct MiriCompilerCalls {
28
29
}
29
30
30
31
impl rustc_driver:: Callbacks for MiriCompilerCalls {
31
- fn after_parsing ( & mut self , compiler : & interface:: Compiler ) -> bool {
32
+ fn after_parsing ( & mut self , compiler : & interface:: Compiler ) -> Compilation {
32
33
let attr = (
33
34
syntax:: symbol:: Symbol :: intern ( "miri" ) ,
34
35
syntax:: feature_gate:: AttributeType :: Whitelisted ,
35
36
) ;
36
37
compiler. session ( ) . plugin_attributes . borrow_mut ( ) . push ( attr) ;
37
38
38
- // Continue execution
39
- true
39
+ Compilation :: Continue
40
40
}
41
41
42
- fn after_analysis ( & mut self , compiler : & interface:: Compiler ) -> bool {
42
+ fn after_analysis ( & mut self , compiler : & interface:: Compiler ) -> Compilation {
43
43
compiler. session ( ) . abort_if_errors ( ) ;
44
44
compiler. global_ctxt ( ) . unwrap ( ) . peek_mut ( ) . enter ( |tcx| {
45
45
if std:: env:: args ( ) . any ( |arg| arg == "--test" ) {
@@ -71,7 +71,7 @@ impl rustc_driver::Callbacks for MiriCompilerCalls {
71
71
} ) ;
72
72
73
73
// Continue execution on host target
74
- self . host_target
74
+ if self . host_target { Compilation :: Continue } else { Compilation :: Stop }
75
75
}
76
76
}
77
77
You can’t perform that action at this time.
0 commit comments