Skip to content

Commit 4b1afad

Browse files
authored
Rollup merge of rust-lang#56600 - ljedrz:fix_edition, r=Mark-Simulacrum
bootstrap: fix edition A byproduct of work on rust-lang#56595; done with `cargo fix --edition`.
2 parents f24fe1b + a5a3da5 commit 4b1afad

21 files changed

+99
-97
lines changed

src/bootstrap/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
authors = ["The Rust Project Developers"]
33
name = "bootstrap"
44
version = "0.0.0"
5+
edition = "2018"
56

67
[lib]
78
name = "bootstrap"

src/bootstrap/builder.rs

+15-15
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,20 @@ use std::path::{Path, PathBuf};
2121
use std::process::Command;
2222
use std::time::{Duration, Instant};
2323

24-
use cache::{Cache, Interned, INTERNER};
25-
use check;
26-
use compile;
27-
use dist;
28-
use doc;
29-
use flags::Subcommand;
30-
use install;
31-
use native;
32-
use test;
33-
use tool;
34-
use util::{add_lib_path, exe, libdir};
35-
use {Build, DocTests, Mode, GitRepo};
36-
37-
pub use Compiler;
24+
use crate::cache::{Cache, Interned, INTERNER};
25+
use crate::check;
26+
use crate::compile;
27+
use crate::dist;
28+
use crate::doc;
29+
use crate::flags::Subcommand;
30+
use crate::install;
31+
use crate::native;
32+
use crate::test;
33+
use crate::tool;
34+
use crate::util::{add_lib_path, exe, libdir};
35+
use crate::{Build, DocTests, Mode, GitRepo};
36+
37+
pub use crate::Compiler;
3838

3939
use petgraph::graph::NodeIndex;
4040
use petgraph::Graph;
@@ -1251,7 +1251,7 @@ impl<'a> Builder<'a> {
12511251
#[cfg(test)]
12521252
mod __test {
12531253
use super::*;
1254-
use config::Config;
1254+
use crate::config::Config;
12551255
use std::thread;
12561256

12571257
fn configure(host: &[&str], target: &[&str]) -> Config {

src/bootstrap/cache.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use std::path::{Path, PathBuf};
2323
use std::sync::Mutex;
2424
use std::cmp::{PartialOrd, Ord, Ordering};
2525

26-
use builder::Step;
26+
use crate::builder::Step;
2727

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

src/bootstrap/cc_detect.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ use std::process::Command;
3939
use build_helper::output;
4040
use cc;
4141

42-
use {Build, GitRepo};
43-
use config::Target;
44-
use cache::Interned;
42+
use crate::{Build, GitRepo};
43+
use crate::config::Target;
44+
use crate::cache::Interned;
4545

4646
// The `cc` crate doesn't provide a way to obtain a path to the detected archiver,
4747
// so use some simplified logic here. First we respect the environment variable `AR`, then

src/bootstrap/channel.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ use std::process::Command;
2020

2121
use build_helper::output;
2222

23-
use Build;
24-
use config::Config;
23+
use crate::Build;
24+
use crate::config::Config;
2525

2626
// The version number
2727
pub const CFG_RELEASE_NUM: &str = "1.32.0";

src/bootstrap/check.rs

+6-5
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@
1010

1111
//! Implementation of compiling the compiler and standard library, in "check" mode.
1212
13-
use compile::{run_cargo, std_cargo, test_cargo, rustc_cargo, rustc_cargo_env, add_to_sysroot};
14-
use builder::{RunConfig, Builder, ShouldRun, Step};
15-
use tool::{prepare_tool_cargo, SourceType};
16-
use {Compiler, Mode};
17-
use cache::{INTERNER, Interned};
13+
use crate::compile::{run_cargo, std_cargo, test_cargo, rustc_cargo, rustc_cargo_env,
14+
add_to_sysroot};
15+
use crate::builder::{RunConfig, Builder, ShouldRun, Step};
16+
use crate::tool::{prepare_tool_cargo, SourceType};
17+
use crate::{Compiler, Mode};
18+
use crate::cache::{INTERNER, Interned};
1819
use std::path::PathBuf;
1920

2021
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]

src/bootstrap/clean.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use std::fs;
1919
use std::io::{self, ErrorKind};
2020
use std::path::Path;
2121

22-
use Build;
22+
use crate::Build;
2323

2424
pub fn clean(build: &Build, all: bool) {
2525
rm_rf("tmp".as_ref());

src/bootstrap/compile.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ use build_helper::{output, mtime, up_to_date};
2929
use filetime::FileTime;
3030
use serde_json;
3131

32-
use util::{exe, libdir, is_dylib};
33-
use {Compiler, Mode, GitRepo};
34-
use native;
32+
use crate::util::{exe, libdir, is_dylib};
33+
use crate::{Compiler, Mode, GitRepo};
34+
use crate::native;
3535

36-
use cache::{INTERNER, Interned};
37-
use builder::{Step, RunConfig, ShouldRun, Builder};
36+
use crate::cache::{INTERNER, Interned};
37+
use crate::builder::{Step, RunConfig, ShouldRun, Builder};
3838

3939
#[derive(Debug, PartialOrd, Ord, Copy, Clone, PartialEq, Eq, Hash)]
4040
pub struct Std {

src/bootstrap/config.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ use std::cmp;
2222

2323
use num_cpus;
2424
use toml;
25-
use cache::{INTERNER, Interned};
26-
use flags::Flags;
27-
pub use flags::Subcommand;
25+
use crate::cache::{INTERNER, Interned};
26+
use crate::flags::Flags;
27+
pub use crate::flags::Subcommand;
2828

2929
/// Global configuration for the entire build and/or bootstrap.
3030
///

src/bootstrap/dist.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ use std::process::{Command, Stdio};
2626

2727
use build_helper::output;
2828

29-
use {Compiler, Mode, LLVM_TOOLS};
30-
use channel;
31-
use util::{libdir, is_dylib, exe};
32-
use builder::{Builder, RunConfig, ShouldRun, Step};
33-
use compile;
34-
use tool::{self, Tool};
35-
use cache::{INTERNER, Interned};
29+
use crate::{Compiler, Mode, LLVM_TOOLS};
30+
use crate::channel;
31+
use crate::util::{libdir, is_dylib, exe};
32+
use crate::builder::{Builder, RunConfig, ShouldRun, Step};
33+
use crate::compile;
34+
use crate::tool::{self, Tool};
35+
use crate::cache::{INTERNER, Interned};
3636
use time;
3737

3838
pub fn pkgname(builder: &Builder, component: &str) -> String {

src/bootstrap/doc.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ use std::fs;
2222
use std::io;
2323
use std::path::{PathBuf, Path};
2424

25-
use Mode;
25+
use crate::Mode;
2626
use build_helper::up_to_date;
2727

28-
use util::symlink_dir;
29-
use builder::{Builder, Compiler, RunConfig, ShouldRun, Step};
30-
use tool::{self, prepare_tool_cargo, Tool, SourceType};
31-
use compile;
32-
use cache::{INTERNER, Interned};
33-
use config::Config;
28+
use crate::util::symlink_dir;
29+
use crate::builder::{Builder, Compiler, RunConfig, ShouldRun, Step};
30+
use crate::tool::{self, prepare_tool_cargo, Tool, SourceType};
31+
use crate::compile;
32+
use crate::cache::{INTERNER, Interned};
33+
use crate::config::Config;
3434

3535
macro_rules! book {
3636
($($name:ident, $path:expr, $book_name:expr;)+) => {

src/bootstrap/flags.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ use std::process;
1919

2020
use getopts::Options;
2121

22-
use builder::Builder;
23-
use config::Config;
24-
use metadata;
25-
use {Build, DocTests};
22+
use crate::builder::Builder;
23+
use crate::config::Config;
24+
use crate::metadata;
25+
use crate::{Build, DocTests};
2626

27-
use cache::{Interned, INTERNER};
27+
use crate::cache::{Interned, INTERNER};
2828

2929
/// Deserialized version of all flags for this compile.
3030
pub struct Flags {

src/bootstrap/install.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ use std::fs;
1818
use std::path::{Path, PathBuf, Component};
1919
use std::process::Command;
2020

21-
use dist::{self, pkgname, sanitize_sh, tmpdir};
21+
use crate::dist::{self, pkgname, sanitize_sh, tmpdir};
2222

23-
use builder::{Builder, RunConfig, ShouldRun, Step};
24-
use cache::Interned;
25-
use config::Config;
23+
use crate::builder::{Builder, RunConfig, ShouldRun, Step};
24+
use crate::cache::Interned;
25+
use crate::config::Config;
2626

2727
pub fn install_docs(builder: &Builder, stage: u32, host: Interned<String>) {
2828
install_sh(builder, "docs", "rust-docs", stage, Some(host));

src/bootstrap/job.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
use std::env;
4343
use std::io;
4444
use std::mem;
45-
use Build;
45+
use crate::Build;
4646

4747
type HANDLE = *mut u8;
4848
type BOOL = i32;

src/bootstrap/lib.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ use std::os::windows::fs::symlink_file;
159159
use build_helper::{run_silent, run_suppressed, try_run_silent, try_run_suppressed, output, mtime};
160160
use filetime::FileTime;
161161

162-
use util::{exe, libdir, OutputFolder, CiEnv};
162+
use crate::util::{exe, libdir, OutputFolder, CiEnv};
163163

164164
mod cc_detect;
165165
mod channel;
@@ -188,7 +188,7 @@ mod job;
188188
mod job {
189189
use libc;
190190

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

198198
#[cfg(any(target_os = "haiku", not(any(unix, windows))))]
199199
mod job {
200-
pub unsafe fn setup(_build: &mut ::Build) {
200+
pub unsafe fn setup(_build: &mut crate::Build) {
201201
}
202202
}
203203

204-
pub use config::Config;
205-
use flags::Subcommand;
206-
use cache::{Interned, INTERNER};
207-
use toolstate::ToolState;
204+
pub use crate::config::Config;
205+
use crate::flags::Subcommand;
206+
use crate::cache::{Interned, INTERNER};
207+
use crate::toolstate::ToolState;
208208

209209
const LLVM_TOOLS: &[&str] = &[
210210
"llvm-nm", // used to inspect binaries; it shows symbol names, their sizes and visibility

src/bootstrap/metadata.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ use std::collections::HashSet;
1616
use build_helper::output;
1717
use serde_json;
1818

19-
use {Build, Crate};
20-
use cache::INTERNER;
19+
use crate::{Build, Crate};
20+
use crate::cache::INTERNER;
2121

2222
#[derive(Deserialize)]
2323
struct Output {

src/bootstrap/native.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ use build_helper::output;
2828
use cmake;
2929
use cc;
3030

31-
use util::{self, exe};
31+
use crate::util::{self, exe};
3232
use build_helper::up_to_date;
33-
use builder::{Builder, RunConfig, ShouldRun, Step};
34-
use cache::Interned;
35-
use GitRepo;
33+
use crate::builder::{Builder, RunConfig, ShouldRun, Step};
34+
use crate::cache::Interned;
35+
use crate::GitRepo;
3636

3737
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
3838
pub struct Llvm {

src/bootstrap/sanity.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ use std::process::Command;
2727

2828
use build_helper::output;
2929

30-
use Build;
30+
use crate::Build;
3131

3232
struct Finder {
3333
cache: HashMap<OsString, Option<PathBuf>>,

src/bootstrap/test.rs

+12-12
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,17 @@ use std::process::Command;
2323

2424
use build_helper::{self, output};
2525

26-
use builder::{Builder, Compiler, Kind, RunConfig, ShouldRun, Step};
27-
use cache::{Interned, INTERNER};
28-
use compile;
29-
use dist;
30-
use flags::Subcommand;
31-
use native;
32-
use tool::{self, Tool, SourceType};
33-
use toolstate::ToolState;
34-
use util::{self, dylib_path, dylib_path_var};
35-
use Crate as CargoCrate;
36-
use {DocTests, Mode, GitRepo};
26+
use crate::builder::{Builder, Compiler, Kind, RunConfig, ShouldRun, Step};
27+
use crate::cache::{Interned, INTERNER};
28+
use crate::compile;
29+
use crate::dist;
30+
use crate::flags::Subcommand;
31+
use crate::native;
32+
use crate::tool::{self, Tool, SourceType};
33+
use crate::toolstate::ToolState;
34+
use crate::util::{self, dylib_path, dylib_path_var};
35+
use crate::Crate as CargoCrate;
36+
use crate::{DocTests, Mode, GitRepo};
3737

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

@@ -577,7 +577,7 @@ impl Step for RustdocJS {
577577
if let Some(ref nodejs) = builder.config.nodejs {
578578
let mut command = Command::new(nodejs);
579579
command.args(&["src/tools/rustdoc-js/tester.js", &*self.host]);
580-
builder.ensure(::doc::Std {
580+
builder.ensure(crate::doc::Std {
581581
target: self.target,
582582
stage: builder.top_stage,
583583
});

src/bootstrap/tool.rs

+10-10
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ use std::path::PathBuf;
1515
use std::process::{Command, exit};
1616
use std::collections::HashSet;
1717

18-
use Mode;
19-
use Compiler;
20-
use builder::{Step, RunConfig, ShouldRun, Builder};
21-
use util::{exe, add_lib_path};
22-
use compile;
23-
use native;
24-
use channel::GitInfo;
25-
use channel;
26-
use cache::Interned;
27-
use toolstate::ToolState;
18+
use crate::Mode;
19+
use crate::Compiler;
20+
use crate::builder::{Step, RunConfig, ShouldRun, Builder};
21+
use crate::util::{exe, add_lib_path};
22+
use crate::compile;
23+
use crate::native;
24+
use crate::channel::GitInfo;
25+
use crate::channel;
26+
use crate::cache::Interned;
27+
use crate::toolstate::ToolState;
2828

2929
#[derive(Debug, Clone, Hash, PartialEq, Eq)]
3030
pub enum SourceType {

src/bootstrap/util.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ use std::path::{Path, PathBuf};
2121
use std::process::Command;
2222
use std::time::{SystemTime, Instant};
2323

24-
use config::Config;
25-
use builder::Builder;
24+
use crate::config::Config;
25+
use crate::builder::Builder;
2626

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

0 commit comments

Comments
 (0)