The OSX bots failed last night due a race condition in save analysis where
concurrent calls to `fs::create_dir_all` conflicted with one another. This
replaces the relevant function call with `fs::create_dir_racy` which is defined
internally to the compiler.
use rustc::ty::{self, TyCtxt};
use std::env;
-use std::fs::{self, File};
+use std::fs::File;
use std::path::{Path, PathBuf};
use syntax::ast::{self, NodeId, PatKind, Attribute, CRATE_NODE_ID};
},
};
- if let Err(e) = fs::create_dir_all(&root_path) {
+ if let Err(e) = rustc::util::fs::create_dir_racy(&root_path) {
tcx.sess.err(&format!("Could not create directory {}: {}",
root_path.display(),
e));