about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorAndy Russell <arussell123@gmail.com>2019-05-09 12:03:13 -0400
committerAndy Russell <arussell123@gmail.com>2019-05-09 12:03:13 -0400
commitb2f71fb540faa4218de506c4d82bbcf237ea78d6 (patch)
treef400b7223dc55e118897880e1063679010245b89 /src
parente6305805a7d36b23c79f8308774778ba6481ce47 (diff)
downloadrust-b2f71fb540faa4218de506c4d82bbcf237ea78d6.tar.gz
rust-b2f71fb540faa4218de506c4d82bbcf237ea78d6.zip
remove unneeded `extern crate`s from build tools
Diffstat (limited to 'src')
-rw-r--r--src/bootstrap/Cargo.toml5
-rw-r--r--src/bootstrap/builder.rs4
-rw-r--r--src/bootstrap/cache.rs2
-rw-r--r--src/bootstrap/clean.rs2
-rw-r--r--src/bootstrap/compile.rs3
-rw-r--r--src/bootstrap/config.rs2
-rw-r--r--src/bootstrap/dist.rs2
-rw-r--r--src/bootstrap/doc.rs2
-rw-r--r--src/bootstrap/install.rs2
-rw-r--r--src/bootstrap/lib.rs15
-rw-r--r--src/bootstrap/metadata.rs1
-rw-r--r--src/bootstrap/native.rs2
-rw-r--r--src/bootstrap/sanity.rs2
-rw-r--r--src/bootstrap/test.rs2
-rw-r--r--src/bootstrap/tool.rs2
-rw-r--r--src/bootstrap/toolstate.rs2
-rw-r--r--src/bootstrap/util.rs2
-rw-r--r--src/tools/build-manifest/Cargo.toml1
-rw-r--r--src/tools/compiletest/Cargo.toml3
-rw-r--r--src/tools/compiletest/src/errors.rs2
-rw-r--r--src/tools/compiletest/src/header.rs2
-rw-r--r--src/tools/compiletest/src/json.rs1
-rw-r--r--src/tools/compiletest/src/main.rs9
-rw-r--r--src/tools/compiletest/src/runtest.rs3
-rw-r--r--src/tools/compiletest/src/util.rs2
-rw-r--r--src/tools/tidy/Cargo.toml3
-rw-r--r--src/tools/tidy/src/deps.rs2
27 files changed, 45 insertions, 35 deletions
diff --git a/src/bootstrap/Cargo.toml b/src/bootstrap/Cargo.toml
index 3151b56d8e8..589ee9276a5 100644
--- a/src/bootstrap/Cargo.toml
+++ b/src/bootstrap/Cargo.toml
@@ -42,11 +42,10 @@ num_cpus = "1.0"
 getopts = "0.2.19"
 cc = "1.0.35"
 libc = "0.2"
-serde = "1.0.8"
-serde_derive = "1.0.8"
+serde = { version = "1.0.8", features = ["derive"] }
 serde_json = "1.0.2"
 toml = "0.4"
-lazy_static = "0.2"
+lazy_static = "1.3.0"
 time = "0.1"
 petgraph = "0.4.13"
 
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
index c84eb6476e0..51663e93169 100644
--- a/src/bootstrap/builder.rs
+++ b/src/bootstrap/builder.rs
@@ -11,6 +11,8 @@ use std::path::{Path, PathBuf};
 use std::process::Command;
 use std::time::{Duration, Instant};
 
+use build_helper::t;
+
 use crate::cache::{Cache, Interned, INTERNER};
 use crate::check;
 use crate::compile;
@@ -1308,6 +1310,8 @@ mod __test {
     use crate::config::Config;
     use std::thread;
 
+    use pretty_assertions::assert_eq;
+
     fn configure(host: &[&str], target: &[&str]) -> Config {
         let mut config = Config::default_opts();
         // don't save toolstates
diff --git a/src/bootstrap/cache.rs b/src/bootstrap/cache.rs
index 239959682cb..f137a7b8cc2 100644
--- a/src/bootstrap/cache.rs
+++ b/src/bootstrap/cache.rs
@@ -13,6 +13,8 @@ use std::path::{Path, PathBuf};
 use std::sync::Mutex;
 use std::cmp::{PartialOrd, Ord, Ordering};
 
+use lazy_static::lazy_static;
+
 use crate::builder::Step;
 
 pub struct Interned<T>(usize, PhantomData<*const T>);
diff --git a/src/bootstrap/clean.rs b/src/bootstrap/clean.rs
index b52e1a7b0e6..73be8bfed8e 100644
--- a/src/bootstrap/clean.rs
+++ b/src/bootstrap/clean.rs
@@ -9,6 +9,8 @@ use std::fs;
 use std::io::{self, ErrorKind};
 use std::path::Path;
 
+use build_helper::t;
+
 use crate::Build;
 
 pub fn clean(build: &Build, all: bool) {
diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
index 66443d472d3..9c4e856f0b8 100644
--- a/src/bootstrap/compile.rs
+++ b/src/bootstrap/compile.rs
@@ -15,8 +15,9 @@ use std::path::{Path, PathBuf};
 use std::process::{Command, Stdio, exit};
 use std::str;
 
-use build_helper::{output, mtime, up_to_date};
+use build_helper::{output, mtime, t, up_to_date};
 use filetime::FileTime;
+use serde::Deserialize;
 use serde_json;
 
 use crate::dist;
diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
index 0c31c41ceda..b1d009a6740 100644
--- a/src/bootstrap/config.rs
+++ b/src/bootstrap/config.rs
@@ -10,8 +10,10 @@ use std::path::{Path, PathBuf};
 use std::process;
 use std::cmp;
 
+use build_helper::t;
 use num_cpus;
 use toml;
+use serde::Deserialize;
 use crate::cache::{INTERNER, Interned};
 use crate::flags::Flags;
 pub use crate::flags::Subcommand;
diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
index 57c06061c34..b0616ff6691 100644
--- a/src/bootstrap/dist.rs
+++ b/src/bootstrap/dist.rs
@@ -14,7 +14,7 @@ use std::io::Write;
 use std::path::{PathBuf, Path};
 use std::process::{Command, Stdio};
 
-use build_helper::output;
+use build_helper::{output, t};
 
 use crate::{Compiler, Mode, LLVM_TOOLS};
 use crate::channel;
diff --git a/src/bootstrap/doc.rs b/src/bootstrap/doc.rs
index 330f66c1df0..9c3a17bff6b 100644
--- a/src/bootstrap/doc.rs
+++ b/src/bootstrap/doc.rs
@@ -13,7 +13,7 @@ use std::io;
 use std::path::{PathBuf, Path};
 
 use crate::Mode;
-use build_helper::up_to_date;
+use build_helper::{t, up_to_date};
 
 use crate::util::symlink_dir;
 use crate::builder::{Builder, Compiler, RunConfig, ShouldRun, Step};
diff --git a/src/bootstrap/install.rs b/src/bootstrap/install.rs
index 2d040d60e5f..deda30b6bbd 100644
--- a/src/bootstrap/install.rs
+++ b/src/bootstrap/install.rs
@@ -8,6 +8,8 @@ use std::fs;
 use std::path::{Path, PathBuf, Component};
 use std::process::Command;
 
+use build_helper::t;
+
 use crate::dist::{self, pkgname, sanitize_sh, tmpdir};
 
 use crate::builder::{Builder, RunConfig, ShouldRun, Step};
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
index f63aac0f0e2..ca4489655ca 100644
--- a/src/bootstrap/lib.rs
+++ b/src/bootstrap/lib.rs
@@ -108,17 +108,6 @@
 #![feature(core_intrinsics)]
 #![feature(drain_filter)]
 
-#[macro_use]
-extern crate build_helper;
-#[macro_use]
-extern crate serde_derive;
-#[macro_use]
-extern crate lazy_static;
-
-#[cfg(test)]
-#[macro_use]
-extern crate pretty_assertions;
-
 use std::cell::{RefCell, Cell};
 use std::collections::{HashSet, HashMap};
 use std::env;
@@ -134,7 +123,9 @@ use std::os::unix::fs::symlink as symlink_file;
 #[cfg(windows)]
 use std::os::windows::fs::symlink_file;
 
-use build_helper::{run_silent, run_suppressed, try_run_silent, try_run_suppressed, output, mtime};
+use build_helper::{
+    mtime, output, run_silent, run_suppressed, t, try_run_silent, try_run_suppressed,
+};
 use filetime::FileTime;
 
 use crate::util::{exe, libdir, OutputFolder, CiEnv};
diff --git a/src/bootstrap/metadata.rs b/src/bootstrap/metadata.rs
index 7fa377f310b..4a71fd2ce0b 100644
--- a/src/bootstrap/metadata.rs
+++ b/src/bootstrap/metadata.rs
@@ -4,6 +4,7 @@ use std::path::PathBuf;
 use std::collections::HashSet;
 
 use build_helper::output;
+use serde::Deserialize;
 use serde_json;
 
 use crate::{Build, Crate};
diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs
index 285f9458c44..5777331b9bf 100644
--- a/src/bootstrap/native.rs
+++ b/src/bootstrap/native.rs
@@ -14,7 +14,7 @@ use std::fs::{self, File};
 use std::path::{Path, PathBuf};
 use std::process::Command;
 
-use build_helper::output;
+use build_helper::{output, t};
 use cmake;
 use cc;
 
diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs
index fa6857cdc11..dc65fb9b797 100644
--- a/src/bootstrap/sanity.rs
+++ b/src/bootstrap/sanity.rs
@@ -15,7 +15,7 @@ use std::fs;
 use std::path::PathBuf;
 use std::process::Command;
 
-use build_helper::output;
+use build_helper::{output, t};
 
 use crate::Build;
 
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs
index 38027aded9c..a3d96836aad 100644
--- a/src/bootstrap/test.rs
+++ b/src/bootstrap/test.rs
@@ -11,7 +11,7 @@ use std::iter;
 use std::path::{Path, PathBuf};
 use std::process::Command;
 
-use build_helper::{self, output};
+use build_helper::{self, output, t};
 
 use crate::builder::{Builder, Compiler, Kind, RunConfig, ShouldRun, Step};
 use crate::cache::{Interned, INTERNER};
diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs
index c23ddbdbc68..edcd68d010e 100644
--- a/src/bootstrap/tool.rs
+++ b/src/bootstrap/tool.rs
@@ -4,6 +4,8 @@ use std::path::PathBuf;
 use std::process::{Command, exit};
 use std::collections::HashSet;
 
+use build_helper::t;
+
 use crate::Mode;
 use crate::Compiler;
 use crate::builder::{Step, RunConfig, ShouldRun, Builder};
diff --git a/src/bootstrap/toolstate.rs b/src/bootstrap/toolstate.rs
index 8ff7c09fc29..e86209be91f 100644
--- a/src/bootstrap/toolstate.rs
+++ b/src/bootstrap/toolstate.rs
@@ -1,3 +1,5 @@
+use serde::{Deserialize, Serialize};
+
 #[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
 #[serde(rename_all = "kebab-case")]
 /// Whether a tool can be compiled, tested or neither
diff --git a/src/bootstrap/util.rs b/src/bootstrap/util.rs
index bda1e56e1e7..a162c65672f 100644
--- a/src/bootstrap/util.rs
+++ b/src/bootstrap/util.rs
@@ -11,6 +11,8 @@ use std::path::{Path, PathBuf};
 use std::process::Command;
 use std::time::{SystemTime, Instant};
 
+use build_helper::t;
+
 use crate::config::Config;
 use crate::builder::Builder;
 
diff --git a/src/tools/build-manifest/Cargo.toml b/src/tools/build-manifest/Cargo.toml
index 93d0f61e1d9..63b6399bb90 100644
--- a/src/tools/build-manifest/Cargo.toml
+++ b/src/tools/build-manifest/Cargo.toml
@@ -7,4 +7,3 @@ edition = "2018"
 [dependencies]
 toml = "0.4"
 serde = { version = "1.0", features = ["derive"] }
-serde_derive = "1.0"
diff --git a/src/tools/compiletest/Cargo.toml b/src/tools/compiletest/Cargo.toml
index 00e1a53473c..336d7e32024 100644
--- a/src/tools/compiletest/Cargo.toml
+++ b/src/tools/compiletest/Cargo.toml
@@ -11,9 +11,8 @@ filetime = "0.2"
 getopts = "0.2"
 log = "0.4"
 regex = "1.0"
-serde = "1.0"
+serde = { version = "1.0", features = ["derive"] }
 serde_json = "1.0"
-serde_derive = "1.0"
 rustfix = "0.4.1"
 lazy_static = "1.0"
 walkdir = "2"
diff --git a/src/tools/compiletest/src/errors.rs b/src/tools/compiletest/src/errors.rs
index 0329fb0db14..5b3936ffc1e 100644
--- a/src/tools/compiletest/src/errors.rs
+++ b/src/tools/compiletest/src/errors.rs
@@ -7,6 +7,8 @@ use std::io::BufReader;
 use std::path::Path;
 use std::str::FromStr;
 
+use log::*;
+
 #[derive(Clone, Debug, PartialEq)]
 pub enum ErrorKind {
     Help,
diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs
index 54e9b76a21e..dbc477585cb 100644
--- a/src/tools/compiletest/src/header.rs
+++ b/src/tools/compiletest/src/header.rs
@@ -4,6 +4,8 @@ use std::io::prelude::*;
 use std::io::BufReader;
 use std::path::{Path, PathBuf};
 
+use log::*;
+
 use crate::common::{self, CompareMode, Config, Mode};
 use crate::util;
 
diff --git a/src/tools/compiletest/src/json.rs b/src/tools/compiletest/src/json.rs
index d651b9a92b6..02b09e21ff0 100644
--- a/src/tools/compiletest/src/json.rs
+++ b/src/tools/compiletest/src/json.rs
@@ -3,6 +3,7 @@
 
 use crate::errors::{Error, ErrorKind};
 use crate::runtest::ProcRes;
+use serde::Deserialize;
 use serde_json;
 use std::path::{Path, PathBuf};
 use std::str::FromStr;
diff --git a/src/tools/compiletest/src/main.rs b/src/tools/compiletest/src/main.rs
index dc5d1b9a853..e253934e566 100644
--- a/src/tools/compiletest/src/main.rs
+++ b/src/tools/compiletest/src/main.rs
@@ -3,14 +3,6 @@
 #![feature(vec_remove_item)]
 #![deny(warnings, rust_2018_idioms)]
 
-#[cfg(unix)]
-extern crate libc;
-#[macro_use]
-extern crate log;
-#[macro_use]
-extern crate lazy_static;
-#[macro_use]
-extern crate serde_derive;
 extern crate test;
 
 use crate::common::CompareMode;
@@ -30,6 +22,7 @@ use crate::util::logv;
 use walkdir::WalkDir;
 use env_logger;
 use getopts;
+use log::*;
 
 use self::header::{EarlyProps, Ignore};
 
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
index a11a4f17eb5..3689946c055 100644
--- a/src/tools/compiletest/src/runtest.rs
+++ b/src/tools/compiletest/src/runtest.rs
@@ -29,6 +29,9 @@ use std::path::{Path, PathBuf};
 use std::process::{Child, Command, ExitStatus, Output, Stdio};
 use std::str;
 
+use lazy_static::lazy_static;
+use log::*;
+
 use crate::extract_gdb_version;
 use crate::is_android_gdb_target;
 
diff --git a/src/tools/compiletest/src/util.rs b/src/tools/compiletest/src/util.rs
index 50dce4b55ae..adc1224bcd3 100644
--- a/src/tools/compiletest/src/util.rs
+++ b/src/tools/compiletest/src/util.rs
@@ -3,6 +3,8 @@ use std::env;
 use std::path::PathBuf;
 use crate::common::Config;
 
+use log::*;
+
 /// Conversion table from triple OS name to Rust SYSNAME
 const OS_TABLE: &'static [(&'static str, &'static str)] = &[
     ("android", "android"),
diff --git a/src/tools/tidy/Cargo.toml b/src/tools/tidy/Cargo.toml
index 433e9264dd1..eeac6cfbb30 100644
--- a/src/tools/tidy/Cargo.toml
+++ b/src/tools/tidy/Cargo.toml
@@ -6,6 +6,5 @@ edition = "2018"
 
 [dependencies]
 regex = "1"
-serde = "1.0.8"
-serde_derive = "1.0.8"
+serde = { version = "1.0.8", features = ["derive"] }
 serde_json = "1.0.2"
diff --git a/src/tools/tidy/src/deps.rs b/src/tools/tidy/src/deps.rs
index e90737febd5..8626ba060bf 100644
--- a/src/tools/tidy/src/deps.rs
+++ b/src/tools/tidy/src/deps.rs
@@ -5,7 +5,7 @@ use std::fs;
 use std::path::Path;
 use std::process::Command;
 
-use serde_derive::Deserialize;
+use serde::Deserialize;
 use serde_json;
 
 const LICENSES: &[&str] = &[