about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--mk/crates.mk7
-rw-r--r--src/librustc_data_structures/flock.rs (renamed from src/librustdoc/flock.rs)0
-rw-r--r--src/librustc_data_structures/lib.rs4
-rw-r--r--src/librustdoc/html/render.rs3
-rw-r--r--src/librustdoc/lib.rs2
5 files changed, 10 insertions, 6 deletions
diff --git a/mk/crates.mk b/mk/crates.mk
index 5ff6d7a89db..a915d07384f 100644
--- a/mk/crates.mk
+++ b/mk/crates.mk
@@ -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
diff --git a/src/librustdoc/flock.rs b/src/librustc_data_structures/flock.rs
index 41bcfdb7cb0..41bcfdb7cb0 100644
--- a/src/librustdoc/flock.rs
+++ b/src/librustc_data_structures/flock.rs
diff --git a/src/librustc_data_structures/lib.rs b/src/librustc_data_structures/lib.rs
index 34c3961d5b4..4391123559f 100644
--- a/src/librustc_data_structures/lib.rs
+++ b/src/librustc_data_structures/lib.rs
@@ -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)]
diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs
index 5cb5cc05187..d3b9ca737b9 100644
--- a/src/librustdoc/html/render.rs
+++ b/src/librustdoc/html/render.rs
@@ -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.
diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs
index 255e6b1e786..0e685f063bd 100644
--- a/src/librustdoc/lib.rs
+++ b/src/librustdoc/lib.rs
@@ -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;