Skip to content

Commit

Permalink
Rollup merge of rust-lang#56600 - ljedrz:fix_edition, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
bootstrap: fix edition

A byproduct of work on rust-lang#56595; done with `cargo fix --edition`.
  • Loading branch information
kennytm authored Dec 13, 2018
2 parents 6fb3eb3 + a5a3da5 commit 3cff3f6
Show file tree
Hide file tree
Showing 21 changed files with 99 additions and 97 deletions.
1 change: 1 addition & 0 deletions src/bootstrap/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
authors = ["The Rust Project Developers"]
name = "bootstrap"
version = "0.0.0"
edition = "2018"

[lib]
name = "bootstrap"
Expand Down
30 changes: 15 additions & 15 deletions src/bootstrap/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@ use std::path::{Path, PathBuf};
use std::process::Command;
use std::time::{Duration, Instant};

use cache::{Cache, Interned, INTERNER};
use check;
use compile;
use dist;
use doc;
use flags::Subcommand;
use install;
use native;
use test;
use tool;
use util::{add_lib_path, exe, libdir};
use {Build, DocTests, Mode, GitRepo};

pub use Compiler;
use crate::cache::{Cache, Interned, INTERNER};
use crate::check;
use crate::compile;
use crate::dist;
use crate::doc;
use crate::flags::Subcommand;
use crate::install;
use crate::native;
use crate::test;
use crate::tool;
use crate::util::{add_lib_path, exe, libdir};
use crate::{Build, DocTests, Mode, GitRepo};

pub use crate::Compiler;

use petgraph::graph::NodeIndex;
use petgraph::Graph;
Expand Down Expand Up @@ -1251,7 +1251,7 @@ impl<'a> Builder<'a> {
#[cfg(test)]
mod __test {
use super::*;
use config::Config;
use crate::config::Config;
use std::thread;

fn configure(host: &[&str], target: &[&str]) -> Config {
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use std::path::{Path, PathBuf};
use std::sync::Mutex;
use std::cmp::{PartialOrd, Ord, Ordering};

use builder::Step;
use crate::builder::Step;

pub struct Interned<T>(usize, PhantomData<*const T>);

Expand Down
6 changes: 3 additions & 3 deletions src/bootstrap/cc_detect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ use std::process::Command;
use build_helper::output;
use cc;

use {Build, GitRepo};
use config::Target;
use cache::Interned;
use crate::{Build, GitRepo};
use crate::config::Target;
use crate::cache::Interned;

// The `cc` crate doesn't provide a way to obtain a path to the detected archiver,
// so use some simplified logic here. First we respect the environment variable `AR`, then
Expand Down
4 changes: 2 additions & 2 deletions src/bootstrap/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ use std::process::Command;

use build_helper::output;

use Build;
use config::Config;
use crate::Build;
use crate::config::Config;

// The version number
pub const CFG_RELEASE_NUM: &str = "1.32.0";
Expand Down
11 changes: 6 additions & 5 deletions src/bootstrap/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@

//! Implementation of compiling the compiler and standard library, in "check" mode.
use compile::{run_cargo, std_cargo, test_cargo, rustc_cargo, rustc_cargo_env, add_to_sysroot};
use builder::{RunConfig, Builder, ShouldRun, Step};
use tool::{prepare_tool_cargo, SourceType};
use {Compiler, Mode};
use cache::{INTERNER, Interned};
use crate::compile::{run_cargo, std_cargo, test_cargo, rustc_cargo, rustc_cargo_env,
add_to_sysroot};
use crate::builder::{RunConfig, Builder, ShouldRun, Step};
use crate::tool::{prepare_tool_cargo, SourceType};
use crate::{Compiler, Mode};
use crate::cache::{INTERNER, Interned};
use std::path::PathBuf;

#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/clean.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use std::fs;
use std::io::{self, ErrorKind};
use std::path::Path;

use Build;
use crate::Build;

pub fn clean(build: &Build, all: bool) {
rm_rf("tmp".as_ref());
Expand Down
10 changes: 5 additions & 5 deletions src/bootstrap/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ use build_helper::{output, mtime, up_to_date};
use filetime::FileTime;
use serde_json;

use util::{exe, libdir, is_dylib};
use {Compiler, Mode, GitRepo};
use native;
use crate::util::{exe, libdir, is_dylib};
use crate::{Compiler, Mode, GitRepo};
use crate::native;

use cache::{INTERNER, Interned};
use builder::{Step, RunConfig, ShouldRun, Builder};
use crate::cache::{INTERNER, Interned};
use crate::builder::{Step, RunConfig, ShouldRun, Builder};

#[derive(Debug, PartialOrd, Ord, Copy, Clone, PartialEq, Eq, Hash)]
pub struct Std {
Expand Down
6 changes: 3 additions & 3 deletions src/bootstrap/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ use std::cmp;

use num_cpus;
use toml;
use cache::{INTERNER, Interned};
use flags::Flags;
pub use flags::Subcommand;
use crate::cache::{INTERNER, Interned};
use crate::flags::Flags;
pub use crate::flags::Subcommand;

/// Global configuration for the entire build and/or bootstrap.
///
Expand Down
14 changes: 7 additions & 7 deletions src/bootstrap/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ use std::process::{Command, Stdio};

use build_helper::output;

use {Compiler, Mode, LLVM_TOOLS};
use channel;
use util::{libdir, is_dylib, exe};
use builder::{Builder, RunConfig, ShouldRun, Step};
use compile;
use tool::{self, Tool};
use cache::{INTERNER, Interned};
use crate::{Compiler, Mode, LLVM_TOOLS};
use crate::channel;
use crate::util::{libdir, is_dylib, exe};
use crate::builder::{Builder, RunConfig, ShouldRun, Step};
use crate::compile;
use crate::tool::{self, Tool};
use crate::cache::{INTERNER, Interned};
use time;

pub fn pkgname(builder: &Builder, component: &str) -> String {
Expand Down
14 changes: 7 additions & 7 deletions src/bootstrap/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ use std::fs;
use std::io;
use std::path::{PathBuf, Path};

use Mode;
use crate::Mode;
use build_helper::up_to_date;

use util::symlink_dir;
use builder::{Builder, Compiler, RunConfig, ShouldRun, Step};
use tool::{self, prepare_tool_cargo, Tool, SourceType};
use compile;
use cache::{INTERNER, Interned};
use config::Config;
use crate::util::symlink_dir;
use crate::builder::{Builder, Compiler, RunConfig, ShouldRun, Step};
use crate::tool::{self, prepare_tool_cargo, Tool, SourceType};
use crate::compile;
use crate::cache::{INTERNER, Interned};
use crate::config::Config;

macro_rules! book {
($($name:ident, $path:expr, $book_name:expr;)+) => {
Expand Down
10 changes: 5 additions & 5 deletions src/bootstrap/flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ use std::process;

use getopts::Options;

use builder::Builder;
use config::Config;
use metadata;
use {Build, DocTests};
use crate::builder::Builder;
use crate::config::Config;
use crate::metadata;
use crate::{Build, DocTests};

use cache::{Interned, INTERNER};
use crate::cache::{Interned, INTERNER};

/// Deserialized version of all flags for this compile.
pub struct Flags {
Expand Down
8 changes: 4 additions & 4 deletions src/bootstrap/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ use std::fs;
use std::path::{Path, PathBuf, Component};
use std::process::Command;

use dist::{self, pkgname, sanitize_sh, tmpdir};
use crate::dist::{self, pkgname, sanitize_sh, tmpdir};

use builder::{Builder, RunConfig, ShouldRun, Step};
use cache::Interned;
use config::Config;
use crate::builder::{Builder, RunConfig, ShouldRun, Step};
use crate::cache::Interned;
use crate::config::Config;

pub fn install_docs(builder: &Builder, stage: u32, host: Interned<String>) {
install_sh(builder, "docs", "rust-docs", stage, Some(host));
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/job.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
use std::env;
use std::io;
use std::mem;
use Build;
use crate::Build;

type HANDLE = *mut u8;
type BOOL = i32;
Expand Down
14 changes: 7 additions & 7 deletions src/bootstrap/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ use std::os::windows::fs::symlink_file;
use build_helper::{run_silent, run_suppressed, try_run_silent, try_run_suppressed, output, mtime};
use filetime::FileTime;

use util::{exe, libdir, OutputFolder, CiEnv};
use crate::util::{exe, libdir, OutputFolder, CiEnv};

mod cc_detect;
mod channel;
Expand Down Expand Up @@ -188,7 +188,7 @@ mod job;
mod job {
use libc;

pub unsafe fn setup(build: &mut ::Build) {
pub unsafe fn setup(build: &mut crate::Build) {
if build.config.low_priority {
libc::setpriority(libc::PRIO_PGRP as _, 0, 10);
}
Expand All @@ -197,14 +197,14 @@ mod job {

#[cfg(any(target_os = "haiku", not(any(unix, windows))))]
mod job {
pub unsafe fn setup(_build: &mut ::Build) {
pub unsafe fn setup(_build: &mut crate::Build) {
}
}

pub use config::Config;
use flags::Subcommand;
use cache::{Interned, INTERNER};
use toolstate::ToolState;
pub use crate::config::Config;
use crate::flags::Subcommand;
use crate::cache::{Interned, INTERNER};
use crate::toolstate::ToolState;

const LLVM_TOOLS: &[&str] = &[
"llvm-nm", // used to inspect binaries; it shows symbol names, their sizes and visibility
Expand Down
4 changes: 2 additions & 2 deletions src/bootstrap/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ use std::collections::HashSet;
use build_helper::output;
use serde_json;

use {Build, Crate};
use cache::INTERNER;
use crate::{Build, Crate};
use crate::cache::INTERNER;

#[derive(Deserialize)]
struct Output {
Expand Down
8 changes: 4 additions & 4 deletions src/bootstrap/native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ use build_helper::output;
use cmake;
use cc;

use util::{self, exe};
use crate::util::{self, exe};
use build_helper::up_to_date;
use builder::{Builder, RunConfig, ShouldRun, Step};
use cache::Interned;
use GitRepo;
use crate::builder::{Builder, RunConfig, ShouldRun, Step};
use crate::cache::Interned;
use crate::GitRepo;

#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct Llvm {
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/sanity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use std::process::Command;

use build_helper::output;

use Build;
use crate::Build;

struct Finder {
cache: HashMap<OsString, Option<PathBuf>>,
Expand Down
24 changes: 12 additions & 12 deletions src/bootstrap/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ use std::process::Command;

use build_helper::{self, output};

use builder::{Builder, Compiler, Kind, RunConfig, ShouldRun, Step};
use cache::{Interned, INTERNER};
use compile;
use dist;
use flags::Subcommand;
use native;
use tool::{self, Tool, SourceType};
use toolstate::ToolState;
use util::{self, dylib_path, dylib_path_var};
use Crate as CargoCrate;
use {DocTests, Mode, GitRepo};
use crate::builder::{Builder, Compiler, Kind, RunConfig, ShouldRun, Step};
use crate::cache::{Interned, INTERNER};
use crate::compile;
use crate::dist;
use crate::flags::Subcommand;
use crate::native;
use crate::tool::{self, Tool, SourceType};
use crate::toolstate::ToolState;
use crate::util::{self, dylib_path, dylib_path_var};
use crate::Crate as CargoCrate;
use crate::{DocTests, Mode, GitRepo};

const ADB_TEST_DIR: &str = "/data/tmp/work";

Expand Down Expand Up @@ -577,7 +577,7 @@ impl Step for RustdocJS {
if let Some(ref nodejs) = builder.config.nodejs {
let mut command = Command::new(nodejs);
command.args(&["src/tools/rustdoc-js/tester.js", &*self.host]);
builder.ensure(::doc::Std {
builder.ensure(crate::doc::Std {
target: self.target,
stage: builder.top_stage,
});
Expand Down
20 changes: 10 additions & 10 deletions src/bootstrap/tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ use std::path::PathBuf;
use std::process::{Command, exit};
use std::collections::HashSet;

use Mode;
use Compiler;
use builder::{Step, RunConfig, ShouldRun, Builder};
use util::{exe, add_lib_path};
use compile;
use native;
use channel::GitInfo;
use channel;
use cache::Interned;
use toolstate::ToolState;
use crate::Mode;
use crate::Compiler;
use crate::builder::{Step, RunConfig, ShouldRun, Builder};
use crate::util::{exe, add_lib_path};
use crate::compile;
use crate::native;
use crate::channel::GitInfo;
use crate::channel;
use crate::cache::Interned;
use crate::toolstate::ToolState;

#[derive(Debug, Clone, Hash, PartialEq, Eq)]
pub enum SourceType {
Expand Down
4 changes: 2 additions & 2 deletions src/bootstrap/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ use std::path::{Path, PathBuf};
use std::process::Command;
use std::time::{SystemTime, Instant};

use config::Config;
use builder::Builder;
use crate::config::Config;
use crate::builder::Builder;

/// Returns the `name` as the filename of a static library for `target`.
pub fn staticlib(name: &str, target: &str) -> String {
Expand Down

0 comments on commit 3cff3f6

Please sign in to comment.