File tree 2 files changed +8
-5
lines changed
2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -143,10 +143,10 @@ where
143
143
)
144
144
}
145
145
146
- pub fn default_thread_pool < F , R > ( f : F ) -> R
146
+ pub fn default_thread_pool < F , R > ( edition : edition :: Edition , f : F ) -> R
147
147
where
148
148
F : FnOnce ( ) -> R + Send ,
149
149
R : Send ,
150
150
{
151
- util:: spawn_thread_pool ( edition:: DEFAULT_EDITION , None , & None , f)
151
+ util:: spawn_thread_pool ( edition, None , & None , f)
152
152
}
Original file line number Diff line number Diff line change @@ -94,9 +94,7 @@ pub fn main() {
94
94
rustc_driver:: set_sigpipe_handler ( ) ;
95
95
env_logger:: init ( ) ;
96
96
let res = std:: thread:: Builder :: new ( ) . stack_size ( thread_stack_size) . spawn ( move || {
97
- rustc_interface:: interface:: default_thread_pool ( move || {
98
- get_args ( ) . map ( |args| main_args ( & args) ) . unwrap_or ( 1 )
99
- } )
97
+ get_args ( ) . map ( |args| main_args ( & args) ) . unwrap_or ( 1 )
100
98
} ) . unwrap ( ) . join ( ) . unwrap_or ( rustc_driver:: EXIT_FAILURE ) ;
101
99
process:: exit ( res) ;
102
100
}
@@ -382,7 +380,12 @@ fn main_args(args: &[String]) -> i32 {
382
380
Ok ( opts) => opts,
383
381
Err ( code) => return code,
384
382
} ;
383
+ rustc_interface:: interface:: default_thread_pool ( options. edition , move || {
384
+ main_options ( options)
385
+ } )
386
+ }
385
387
388
+ fn main_options ( options : config:: Options ) -> i32 {
386
389
let diag = core:: new_handler ( options. error_format ,
387
390
None ,
388
391
options. debugging_options . treat_err_as_bug ,
You can’t perform that action at this time.
0 commit comments