Replace tempdir by tempfile in librustdoc

This commit is contained in:
Bastien Orivel 2018-05-08 22:06:04 +02:00
parent 637fd2e048
commit ae9a27185e
4 changed files with 5 additions and 5 deletions

View File

@ -2427,7 +2427,7 @@ version = "0.0.0"
dependencies = [
"minifier 0.0.11 (registry+https://github.com/rust-lang/crates.io-index)",
"pulldown-cmark 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
"tempfile 3.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]

View File

@ -9,5 +9,5 @@ path = "lib.rs"
[dependencies]
pulldown-cmark = { version = "0.1.2", default-features = false }
tempdir = "0.3"
minifier = "0.0.11"
tempfile = "3"

View File

@ -46,7 +46,7 @@ extern crate test as testing;
#[macro_use] extern crate log;
extern crate rustc_errors as errors;
extern crate pulldown_cmark;
extern crate tempdir;
extern crate tempfile;
extern crate minifier;
extern crate serialize as rustc_serialize; // used by deriving

View File

@ -27,7 +27,7 @@ use rustc::session::{self, CompileIncomplete, config};
use rustc::session::config::{OutputType, OutputTypes, Externs, CodegenOptions};
use rustc::session::search_paths::{SearchPaths, PathKind};
use rustc_metadata::dynamic_lib::DynamicLibrary;
use tempdir::TempDir;
use tempfile::Builder as TempFileBuilder;
use rustc_driver::{self, driver, target_features, Compilation};
use rustc_driver::driver::phase_2_configure_and_expand;
use rustc_metadata::cstore::CStore;
@ -277,7 +277,7 @@ fn run_test(test: &str, cratename: &str, filename: &FileName, line: usize,
let cstore = CStore::new(codegen_backend.metadata_loader());
rustc_lint::register_builtins(&mut sess.lint_store.borrow_mut(), Some(&sess));
let outdir = Mutex::new(TempDir::new("rustdoctest").ok().expect("rustdoc needs a tempdir"));
let outdir = Mutex::new(TempFileBuilder::new().prefix("rustdoctest").tempdir().expect("rustdoc needs a tempdir"));
let libdir = sess.target_filesearch(PathKind::All).get_lib_path();
let mut control = driver::CompileController::basic();