Move flock.rs from librustdoc to librustc_data_structures.

This commit is contained in:
Michael Woerister 2016-08-12 18:22:02 -04:00
parent 86dde9bbda
commit 6ef8198406
5 changed files with 10 additions and 6 deletions

View File

@ -112,7 +112,7 @@ DEPS_rustc := syntax fmt_macros flate arena serialize getopts rbml \
rustc_const_math syntax_pos rustc_errors
DEPS_rustc_back := std syntax flate log libc
DEPS_rustc_borrowck := rustc log graphviz syntax syntax_pos rustc_errors rustc_mir
DEPS_rustc_data_structures := std log serialize
DEPS_rustc_data_structures := std log serialize libc
DEPS_rustc_driver := arena flate getopts graphviz libc rustc rustc_back rustc_borrowck \
rustc_typeck rustc_mir rustc_resolve log syntax serialize rustc_llvm \
rustc_trans rustc_privacy rustc_lint rustc_plugin \
@ -137,9 +137,8 @@ DEPS_rustc_save_analysis := rustc log syntax syntax_pos serialize
DEPS_rustc_typeck := rustc syntax syntax_pos rustc_platform_intrinsics rustc_const_math \
rustc_const_eval rustc_errors
DEPS_rustdoc := rustc rustc_driver native:hoedown serialize getopts \
test rustc_lint rustc_const_eval syntax_pos
DEPS_rustdoc := rustc rustc_driver native:hoedown serialize getopts test \
rustc_lint rustc_const_eval syntax_pos rustc_data_structures
TOOL_DEPS_compiletest := test getopts log serialize
TOOL_DEPS_rustdoc := rustdoc

View File

@ -30,6 +30,7 @@
#![feature(staged_api)]
#![feature(unboxed_closures)]
#![feature(fn_traits)]
#![feature(libc)]
#![cfg_attr(test, feature(test))]
@ -37,6 +38,8 @@ extern crate core;
#[macro_use]
extern crate log;
extern crate serialize as rustc_serialize; // used by deriving
#[cfg(unix)]
extern crate libc;
pub mod bitvec;
pub mod graph;
@ -51,6 +54,7 @@ pub mod fnv;
pub mod tuple_slice;
pub mod veccell;
pub mod control_flow_graph;
pub mod flock;
// See comments in src/librustc/lib.rs
#[doc(hidden)]

View File

@ -62,6 +62,7 @@ use rustc::middle::stability;
use rustc::session::config::get_unstable_features_setting;
use rustc::hir;
use rustc::util::nodemap::{FnvHashMap, FnvHashSet};
use rustc_data_structures::flock;
use clean::{self, Attributes, GetDefId};
use doctree;
@ -651,7 +652,7 @@ fn write_shared(cx: &Context,
// docs placed in the output directory, so this needs to be a synchronized
// operation with respect to all other rustdocs running around.
try_err!(mkdir(&cx.dst), &cx.dst);
let _lock = ::flock::Lock::new(&cx.dst.join(".lock"));
let _lock = flock::Lock::new(&cx.dst.join(".lock"));
// Add all the static files. These may already exist, but we just
// overwrite them anyway to make sure that they're fresh and up-to-date.

View File

@ -35,6 +35,7 @@ extern crate libc;
extern crate rustc;
extern crate rustc_const_eval;
extern crate rustc_const_math;
extern crate rustc_data_structures;
extern crate rustc_trans;
extern crate rustc_driver;
extern crate rustc_resolve;
@ -86,7 +87,6 @@ pub mod plugins;
pub mod visit_ast;
pub mod visit_lib;
pub mod test;
mod flock;
use clean::Attributes;