File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 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;
1919use rustc:: hir:: { self , itemlikevisit} ;
2020use rustc:: ty:: TyCtxt ;
2121use rustc:: hir:: def_id:: LOCAL_CRATE ;
22+ use rustc_driver:: Compilation ;
2223
2324use miri:: MiriConfig ;
2425
@@ -28,18 +29,17 @@ struct MiriCompilerCalls {
2829}
2930
3031impl 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 {
3233 let attr = (
3334 syntax:: symbol:: Symbol :: intern ( "miri" ) ,
3435 syntax:: feature_gate:: AttributeType :: Whitelisted ,
3536 ) ;
3637 compiler. session ( ) . plugin_attributes . borrow_mut ( ) . push ( attr) ;
3738
38- // Continue execution
39- true
39+ Compilation :: Continue
4040 }
4141
42- fn after_analysis ( & mut self , compiler : & interface:: Compiler ) -> bool {
42+ fn after_analysis ( & mut self , compiler : & interface:: Compiler ) -> Compilation {
4343 compiler. session ( ) . abort_if_errors ( ) ;
4444 compiler. global_ctxt ( ) . unwrap ( ) . peek_mut ( ) . enter ( |tcx| {
4545 if std:: env:: args ( ) . any ( |arg| arg == "--test" ) {
@@ -71,7 +71,7 @@ impl rustc_driver::Callbacks for MiriCompilerCalls {
7171 } ) ;
7272
7373 // Continue execution on host target
74- self . host_target
74+ if self . host_target { Compilation :: Continue } else { Compilation :: Stop }
7575 }
7676}
7777
You can’t perform that action at this time.
0 commit comments