Skip to content

Commit

Permalink
Replace tempdir by tempfile in librustdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
Eijebong committed Jun 20, 2018
1 parent 637fd2e commit ae9a271
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Cargo.lock
Expand Up @@ -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]]
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/Cargo.toml
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion src/librustdoc/lib.rs
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/librustdoc/test.rs
Expand Up @@ -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;
Expand Down Expand Up @@ -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();

Expand Down

0 comments on commit ae9a271

Please sign in to comment.