Skip to content

Commit 7a92d0a

Browse files
Move flock.rs from librustdoc to librustc_data_structures.
1 parent e25542c commit 7a92d0a

File tree

5 files changed

+10
-6
lines changed

5 files changed

+10
-6
lines changed

mk/crates.mk

+3-4
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ DEPS_rustc := syntax fmt_macros flate arena serialize getopts rbml \
111111
rustc_const_math syntax_pos rustc_errors
112112
DEPS_rustc_back := std syntax flate log libc
113113
DEPS_rustc_borrowck := rustc log graphviz syntax syntax_pos rustc_errors rustc_mir
114-
DEPS_rustc_data_structures := std log serialize
114+
DEPS_rustc_data_structures := std log serialize libc
115115
DEPS_rustc_driver := arena flate getopts graphviz libc rustc rustc_back rustc_borrowck \
116116
rustc_typeck rustc_mir rustc_resolve log syntax serialize rustc_llvm \
117117
rustc_trans rustc_privacy rustc_lint rustc_plugin \
@@ -135,9 +135,8 @@ DEPS_rustc_save_analysis := rustc log syntax syntax_pos serialize
135135
DEPS_rustc_typeck := rustc syntax syntax_pos rustc_platform_intrinsics rustc_const_math \
136136
rustc_const_eval rustc_errors
137137

138-
DEPS_rustdoc := rustc rustc_driver native:hoedown serialize getopts \
139-
test rustc_lint rustc_const_eval syntax_pos
140-
138+
DEPS_rustdoc := rustc rustc_driver native:hoedown serialize getopts test \
139+
rustc_lint rustc_const_eval syntax_pos rustc_data_structures
141140

142141
TOOL_DEPS_compiletest := test getopts log serialize
143142
TOOL_DEPS_rustdoc := rustdoc
File renamed without changes.

src/librustc_data_structures/lib.rs

+4
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,16 @@
3030
#![feature(staged_api)]
3131
#![feature(unboxed_closures)]
3232
#![feature(fn_traits)]
33+
#![feature(libc)]
3334

3435
#![cfg_attr(test, feature(test))]
3536

3637
extern crate core;
3738
#[macro_use]
3839
extern crate log;
3940
extern crate serialize as rustc_serialize; // used by deriving
41+
#[cfg(unix)]
42+
extern crate libc;
4043

4144
pub mod bitvec;
4245
pub mod graph;
@@ -51,6 +54,7 @@ pub mod fnv;
5154
pub mod tuple_slice;
5255
pub mod veccell;
5356
pub mod control_flow_graph;
57+
pub mod flock;
5458

5559
// See comments in src/librustc/lib.rs
5660
#[doc(hidden)]

src/librustdoc/html/render.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ use rustc::middle::privacy::AccessLevels;
6161
use rustc::middle::stability;
6262
use rustc::session::config::get_unstable_features_setting;
6363
use rustc::hir;
64+
use rustc_data_structures::flock;
6465

6566
use clean::{self, Attributes, GetDefId};
6667
use doctree;
@@ -650,7 +651,7 @@ fn write_shared(cx: &Context,
650651
// docs placed in the output directory, so this needs to be a synchronized
651652
// operation with respect to all other rustdocs running around.
652653
try_err!(mkdir(&cx.dst), &cx.dst);
653-
let _lock = ::flock::Lock::new(&cx.dst.join(".lock"));
654+
let _lock = flock::Lock::new(&cx.dst.join(".lock"));
654655

655656
// Add all the static files. These may already exist, but we just
656657
// overwrite them anyway to make sure that they're fresh and up-to-date.

src/librustdoc/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ extern crate libc;
3535
extern crate rustc;
3636
extern crate rustc_const_eval;
3737
extern crate rustc_const_math;
38+
extern crate rustc_data_structures;
3839
extern crate rustc_trans;
3940
extern crate rustc_driver;
4041
extern crate rustc_resolve;
@@ -86,7 +87,6 @@ pub mod plugins;
8687
pub mod visit_ast;
8788
pub mod visit_lib;
8889
pub mod test;
89-
mod flock;
9090

9191
use clean::Attributes;
9292

0 commit comments

Comments
 (0)