@@ -35,6 +35,7 @@ pub struct Compiler {
3535 pub ( crate ) input_path : Option < PathBuf > ,
3636 pub ( crate ) output_dir : Option < PathBuf > ,
3737 pub ( crate ) output_file : Option < PathBuf > ,
38+ pub ( crate ) temps_dir : Option < PathBuf > ,
3839 pub ( crate ) register_lints : Option < Box < dyn Fn ( & Session , & mut LintStore ) + Send + Sync > > ,
3940 pub ( crate ) override_queries :
4041 Option < fn ( & Session , & mut ty:: query:: Providers , & mut ty:: query:: Providers ) > ,
@@ -56,6 +57,9 @@ impl Compiler {
5657 pub fn output_file ( & self ) -> & Option < PathBuf > {
5758 & self . output_file
5859 }
60+ pub fn temps_dir ( & self ) -> & Option < PathBuf > {
61+ & self . temps_dir
62+ }
5963 pub fn register_lints ( & self ) -> & Option < Box < dyn Fn ( & Session , & mut LintStore ) + Send + Sync > > {
6064 & self . register_lints
6165 }
@@ -68,6 +72,7 @@ impl Compiler {
6872 & self . input ,
6973 & self . output_dir ,
7074 & self . output_file ,
75+ & self . temps_dir ,
7176 & attrs,
7277 & sess,
7378 )
@@ -134,6 +139,7 @@ pub struct Config {
134139 pub input_path : Option < PathBuf > ,
135140 pub output_dir : Option < PathBuf > ,
136141 pub output_file : Option < PathBuf > ,
142+ pub temps_dir : Option < PathBuf > ,
137143 pub file_loader : Option < Box < dyn FileLoader + Send + Sync > > ,
138144 pub diagnostic_output : DiagnosticOutput ,
139145
@@ -195,6 +201,7 @@ pub fn create_compiler_and_run<R>(config: Config, f: impl FnOnce(&Compiler) -> R
195201 input_path : config. input_path ,
196202 output_dir : config. output_dir ,
197203 output_file : config. output_file ,
204+ temps_dir : config. temps_dir ,
198205 register_lints : config. register_lints ,
199206 override_queries : config. override_queries ,
200207 } ;
0 commit comments