]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_interface/interface.rs
Rollup merge of #60766 - vorner:weak-into-raw, r=sfackler
[rust.git] / src / librustc_interface / interface.rs
index f2a21d61aed4a478259ec2595faa3d497878b776..674b2b60e44a2520dcfe81209b47399b61863b46 100644 (file)
@@ -18,6 +18,7 @@
 use std::sync::{Arc, Mutex};
 use syntax;
 use syntax::source_map::{FileLoader, SourceMap};
+use syntax_pos::edition;
 
 pub type Result<T> = result::Result<T, ErrorReported>;
 
@@ -135,16 +136,17 @@ pub fn run_compiler<F, R>(mut config: Config, f: F) -> R
 {
     let stderr = config.stderr.take();
     util::spawn_thread_pool(
+        config.opts.edition,
         config.opts.debugging_opts.threads,
         &stderr,
         || run_compiler_in_existing_thread_pool(config, f),
     )
 }
 
-pub fn default_thread_pool<F, R>(f: F) -> R
+pub fn default_thread_pool<F, R>(edition: edition::Edition, f: F) -> R
 where
     F: FnOnce() -> R + Send,
     R: Send,
 {
-    util::spawn_thread_pool(None, &None, f)
+    util::spawn_thread_pool(edition, None, &None, f)
 }