Skip to content

Commit 66f9329

Browse files
committed
Move time out of extra (cc #8784)
1 parent 2fa7d6b commit 66f9329

23 files changed

+54
-43
lines changed

AUTHORS.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Adrien Tétar <[email protected]>
77
Alan Andrade <[email protected]>
88
Aleksander Balicki <[email protected]>
99
Alex Crichton <[email protected]>
10+
Alex Lyon <[email protected]>
1011
Alex Rønne Petersen <[email protected]>
1112
Alexander Stavonin <[email protected]>
1213
Alexandros Tasos <[email protected]>

mk/crates.mk

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,21 +50,21 @@
5050
################################################################################
5151

5252
TARGET_CRATES := std extra green rustuv native flate arena glob term semver \
53-
uuid serialize sync getopts collections num test
53+
uuid serialize sync getopts collections num test time
5454
HOST_CRATES := syntax rustc rustdoc fourcc
5555
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
5656
TOOLS := compiletest rustdoc rustc
5757

5858
DEPS_std := native:rustrt native:compiler-rt
59-
DEPS_extra := std term sync serialize getopts collections
59+
DEPS_extra := std term sync serialize getopts collections time
6060
DEPS_green := std native:context_switch
6161
DEPS_rustuv := std native:uv native:uv_support
6262
DEPS_native := std
6363
DEPS_syntax := std term serialize collections
6464
DEPS_rustc := syntax native:rustllvm flate arena serialize sync getopts \
65-
collections extra
65+
collections time extra
6666
DEPS_rustdoc := rustc native:sundown serialize sync getopts collections \
67-
test
67+
test time
6868
DEPS_flate := std native:miniz
6969
DEPS_arena := std collections
7070
DEPS_glob := std
@@ -78,6 +78,7 @@ DEPS_collections := std serialize
7878
DEPS_fourcc := syntax std
7979
DEPS_num := std extra
8080
DEPS_test := std extra collections getopts serialize term
81+
DEPS_time := std serialize
8182

8283
TOOL_DEPS_compiletest := test green rustuv getopts
8384
TOOL_DEPS_rustdoc := rustdoc green rustuv

src/doc/rust.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -875,14 +875,14 @@ An example of what will and will not work for `use` items:
875875

876876
~~~~
877877
# #[allow(unused_imports)];
878-
use foo::extra; // good: foo is at the root of the crate
878+
use foo::extra::json; // good: foo is at the root of the crate
879879
use foo::baz::foobaz; // good: foo is at the root of the crate
880880
881881
mod foo {
882882
extern crate extra;
883883
884-
use foo::extra::time; // good: foo is at crate root
885-
// use extra::*; // bad: extra is not at the crate root
884+
use foo::extra::json; // good: foo is at crate root
885+
// use extra::json::*; // bad: extra is not at the crate root
886886
use self::baz::foobaz; // good: self refers to module 'foo'
887887
use foo::bar::foobar; // good: foo is at crate root
888888

src/libextra/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ Rust extras are part of the standard Rust distribution.
3737
extern crate sync;
3838
extern crate serialize;
3939
extern crate collections;
40+
extern crate time;
4041

4142
// Utility modules
4243
pub mod c_vec;
4344
pub mod url;
4445
pub mod json;
4546
pub mod tempfile;
46-
pub mod time;
4747
pub mod workcache;
4848
pub mod stats;
4949

src/librustc/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ extern crate serialize;
3939
extern crate sync;
4040
extern crate getopts;
4141
extern crate collections;
42+
extern crate time;
4243

4344
use back::link;
4445
use driver::session;

src/librustc/metadata/loader.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ use std::io;
3232
use std::os::consts::{macos, freebsd, linux, android, win32};
3333
use std::str;
3434
use std::vec;
35+
3536
use flate;
37+
use time;
3638

3739
pub enum Os {
3840
OsMacos,
@@ -361,7 +363,6 @@ impl ArchiveMetadata {
361363

362364
// Just a small wrapper to time how long reading metadata takes.
363365
fn get_metadata_section(os: Os, filename: &Path) -> Option<MetadataBlob> {
364-
use extra::time;
365366
let start = time::precise_time_ns();
366367
let ret = get_metadata_section_imp(os, filename);
367368
info!("reading {} => {}ms", filename.filename_display(),

src/librustc/middle/trans/base.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ use util::ppaux::{Repr, ty_to_str};
7272
use util::sha2::Sha256;
7373

7474
use arena::TypedArena;
75-
use extra::time;
7675
use std::c_str::ToCStr;
7776
use std::cell::{Cell, RefCell};
7877
use std::hashmap::HashMap;
@@ -90,6 +89,8 @@ use syntax::visit::Visitor;
9089
use syntax::visit;
9190
use syntax::{ast, ast_util, ast_map};
9291

92+
use time;
93+
9394
pub use middle::trans::context::task_llcx;
9495

9596
local_data_key!(task_local_insn_key: ~[&'static str])

src/librustc/util/common.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ use syntax::visit;
1616
use syntax::visit::Visitor;
1717

1818
use std::local_data;
19-
use extra::time;
19+
20+
use time;
2021

2122
pub fn time<T, U>(do_it: bool, what: &str, u: U, f: |U| -> T) -> T {
2223
local_data_key!(depth: uint);

src/librustdoc/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ extern crate sync;
2424
extern crate getopts;
2525
extern crate collections;
2626
extern crate testing = "test";
27+
extern crate time;
2728

2829
use std::local_data;
2930
use std::io;
3031
use std::io::{File, MemWriter};
3132
use std::str;
3233
use extra::json;
3334
use serialize::{Decodable, Encodable};
34-
use extra::time;
3535

3636
pub mod clean;
3737
pub mod core;

src/libtest/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,14 @@ extern crate extra;
2626
extern crate getopts;
2727
extern crate serialize;
2828
extern crate term;
29+
extern crate time;
2930

3031
use collections::TreeMap;
3132
use extra::json::ToJson;
3233
use extra::json;
3334
use extra::stats::Stats;
3435
use extra::stats;
35-
use extra::time::precise_time_ns;
36+
use time::precise_time_ns;
3637
use getopts::{OptGroup, optflag, optopt};
3738
use serialize::Decodable;
3839
use term::Terminal;

0 commit comments

Comments
 (0)