Auto merge of #56600 - ljedrz:fix_edition, r=Mark-Simulacrum
bootstrap: fix edition A byproduct of work on https://github.com/rust-lang/rust/pull/56595; done with `cargo fix --edition`.
This commit is contained in:
commit
748d354af3
@ -2,6 +2,7 @@
|
||||
authors = ["The Rust Project Developers"]
|
||||
name = "bootstrap"
|
||||
version = "0.0.0"
|
||||
edition = "2018"
|
||||
|
||||
[lib]
|
||||
name = "bootstrap"
|
||||
|
@ -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};
|
||||
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 Compiler;
|
||||
pub use crate::Compiler;
|
||||
|
||||
use petgraph::graph::NodeIndex;
|
||||
use petgraph::Graph;
|
||||
@ -1252,7 +1252,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 {
|
||||
|
@ -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>);
|
||||
|
||||
|
@ -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
|
||||
|
@ -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.33.0";
|
||||
|
@ -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)]
|
||||
|
@ -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());
|
||||
|
@ -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 {
|
||||
|
@ -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.
|
||||
///
|
||||
|
@ -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 {
|
||||
|
@ -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;)+) => {
|
||||
|
@ -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 {
|
||||
|
@ -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));
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
@ -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);
|
||||
}
|
||||
@ -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
|
||||
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
@ -27,7 +27,7 @@ use std::process::Command;
|
||||
|
||||
use build_helper::output;
|
||||
|
||||
use Build;
|
||||
use crate::Build;
|
||||
|
||||
struct Finder {
|
||||
cache: HashMap<OsString, Option<PathBuf>>,
|
||||
|
@ -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";
|
||||
|
||||
@ -616,7 +616,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,
|
||||
});
|
||||
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user