Skip to content

Commit 0b37900

Browse files
committed
Specify the edition for the rustdoc thread-pool
1 parent a1f2dce commit 0b37900

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/librustc_interface/interface.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,10 @@ where
143143
)
144144
}
145145

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
147147
where
148148
F: FnOnce() -> R + Send,
149149
R: Send,
150150
{
151-
util::spawn_thread_pool(edition::DEFAULT_EDITION, None, &None, f)
151+
util::spawn_thread_pool(edition, None, &None, f)
152152
}

src/librustdoc/lib.rs

+6-3
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,7 @@ pub fn main() {
9494
rustc_driver::set_sigpipe_handler();
9595
env_logger::init();
9696
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)
10098
}).unwrap().join().unwrap_or(rustc_driver::EXIT_FAILURE);
10199
process::exit(res);
102100
}
@@ -382,7 +380,12 @@ fn main_args(args: &[String]) -> i32 {
382380
Ok(opts) => opts,
383381
Err(code) => return code,
384382
};
383+
rustc_interface::interface::default_thread_pool(options.edition, move || {
384+
main_options(options)
385+
})
386+
}
385387

388+
fn main_options(options: config::Options) -> i32 {
386389
let diag = core::new_handler(options.error_format,
387390
None,
388391
options.debugging_options.treat_err_as_bug,

0 commit comments

Comments
 (0)