File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
compiler/rustc_interface/src Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -691,6 +691,13 @@ pub fn prepare_outputs(
691691 }
692692 }
693693
694+ if let Some ( ref dir) = compiler. temps_dir {
695+ if fs:: create_dir_all ( dir) . is_err ( ) {
696+ sess. err ( "failed to find or create the directory specified by `--temps-dir`" ) ;
697+ return Err ( ErrorReported ) ;
698+ }
699+ }
700+
694701 write_out_deps ( sess, boxed_resolver, & outputs, & output_paths) ;
695702
696703 let only_dep_info = sess. opts . output_types . contains_key ( & OutputType :: DepInfo )
@@ -703,12 +710,6 @@ pub fn prepare_outputs(
703710 return Err ( ErrorReported ) ;
704711 }
705712 }
706- if let Some ( ref dir) = compiler. temps_dir {
707- if fs:: create_dir_all ( dir) . is_err ( ) {
708- sess. err ( "failed to find or create the directory specified by `--temps-dir`" ) ;
709- return Err ( ErrorReported ) ;
710- }
711- }
712713 }
713714
714715 Ok ( outputs)
You can’t perform that action at this time.
0 commit comments