diff options
| author | Zack M. Davis <code@zackmdavis.net> | 2017-08-06 22:54:09 -0700 |
|---|---|---|
| committer | Zack M. Davis <code@zackmdavis.net> | 2017-08-15 15:29:17 -0700 |
| commit | 1b6c9605e41b7c7dc23e0e6f633f05912d0463dd (patch) | |
| tree | 2482313e8e0761fd8e3ecddc8baad7bf96689b07 /src/bootstrap | |
| parent | 82be83cf744611a016fb09ae1afbffc04b3ed2e1 (diff) | |
use field init shorthand EVERYWHERE
Like #43008 (f668999), but _much more aggressive_.
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/builder.rs | 10 | ||||
| -rw-r--r-- | src/bootstrap/check.rs | 6 | ||||
| -rw-r--r-- | src/bootstrap/compile.rs | 20 | ||||
| -rw-r--r-- | src/bootstrap/doc.rs | 4 | ||||
| -rw-r--r-- | src/bootstrap/flags.rs | 14 | ||||
| -rw-r--r-- | src/bootstrap/lib.rs | 14 | ||||
| -rw-r--r-- | src/bootstrap/metadata.rs | 4 |
7 files changed, 36 insertions, 36 deletions
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index 91dddc7b5bc..cf6ebb48b2c 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -193,7 +193,7 @@ pub struct ShouldRun<'a> { impl<'a> ShouldRun<'a> { fn new(builder: &'a Builder) -> ShouldRun<'a> { ShouldRun { - builder: builder, + builder, paths: BTreeSet::new(), is_really_default: true, // by default no additional conditions } @@ -278,9 +278,9 @@ impl<'a> Builder<'a> { }; let builder = Builder { - build: build, + build, top_stage: build.config.stage.unwrap_or(2), - kind: kind, + kind, cache: Cache::new(), stack: RefCell::new(Vec::new()), }; @@ -309,9 +309,9 @@ impl<'a> Builder<'a> { }; let builder = Builder { - build: build, + build, top_stage: build.config.stage.unwrap_or(2), - kind: kind, + kind, cache: Cache::new(), stack: RefCell::new(Vec::new()), }; diff --git a/src/bootstrap/check.rs b/src/bootstrap/check.rs index 1823dd4ebc0..92fb2105b7c 100644 --- a/src/bootstrap/check.rs +++ b/src/bootstrap/check.rs @@ -872,7 +872,7 @@ impl Step for CrateLibrustc { builder.ensure(CrateLibrustc { compiler, target: run.target, - test_kind: test_kind, + test_kind, krate: name, }); }; @@ -934,8 +934,8 @@ impl Step for Crate { builder.ensure(Crate { compiler, target: run.target, - mode: mode, - test_kind: test_kind, + mode, + test_kind, krate: name, }); }; diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs index 33c3638a894..78bc225447b 100644 --- a/src/bootstrap/compile.rs +++ b/src/bootstrap/compile.rs @@ -74,13 +74,13 @@ impl Step for Std { let from = builder.compiler(1, build.build); builder.ensure(Std { compiler: from, - target: target, + target, }); println!("Uplifting stage1 std ({} -> {})", from.host, target); builder.ensure(StdLink { compiler: from, target_compiler: compiler, - target: target, + target, }); return; } @@ -100,7 +100,7 @@ impl Step for Std { builder.ensure(StdLink { compiler: builder.compiler(compiler.stage, build.build), target_compiler: compiler, - target: target, + target, }); } } @@ -202,7 +202,7 @@ impl Step for StdLink { builder.ensure(tool::CleanTools { compiler: target_compiler, - target: target, + target, mode: Mode::Libstd, }); } @@ -326,13 +326,13 @@ impl Step for Test { if build.force_use_stage1(compiler, target) { builder.ensure(Test { compiler: builder.compiler(1, build.build), - target: target, + target, }); println!("Uplifting stage1 test ({} -> {})", &build.build, target); builder.ensure(TestLink { compiler: builder.compiler(1, build.build), target_compiler: compiler, - target: target, + target, }); return; } @@ -351,7 +351,7 @@ impl Step for Test { builder.ensure(TestLink { compiler: builder.compiler(compiler.stage, build.build), target_compiler: compiler, - target: target, + target, }); } } @@ -398,7 +398,7 @@ impl Step for TestLink { &libtest_stamp(build, compiler, target)); builder.ensure(tool::CleanTools { compiler: target_compiler, - target: target, + target, mode: Mode::Libtest, }); } @@ -445,7 +445,7 @@ impl Step for Rustc { if build.force_use_stage1(compiler, target) { builder.ensure(Rustc { compiler: builder.compiler(1, build.build), - target: target, + target, }); println!("Uplifting stage1 rustc ({} -> {})", &build.build, target); builder.ensure(RustcLink { @@ -581,7 +581,7 @@ impl Step for RustcLink { &librustc_stamp(build, compiler, target)); builder.ensure(tool::CleanTools { compiler: target_compiler, - target: target, + target, mode: Mode::Librustc, }); } diff --git a/src/bootstrap/doc.rs b/src/bootstrap/doc.rs index 05c7d689f2c..5ade2c279e2 100644 --- a/src/bootstrap/doc.rs +++ b/src/bootstrap/doc.rs @@ -213,13 +213,13 @@ impl Step for TheBook { let name = self.name; // build book first edition builder.ensure(Rustbook { - target: target, + target, name: INTERNER.intern_string(format!("{}/first-edition", name)), }); // build book second edition builder.ensure(Rustbook { - target: target, + target, name: INTERNER.intern_string(format!("{}/second-edition", name)), }); diff --git a/src/bootstrap/flags.rs b/src/bootstrap/flags.rs index a9cefb65f49..a84d43d3dee 100644 --- a/src/bootstrap/flags.rs +++ b/src/bootstrap/flags.rs @@ -274,14 +274,14 @@ Arguments: } "test" => { Subcommand::Test { - paths: paths, + paths, test_args: matches.opt_strs("test-args"), fail_fast: !matches.opt_present("no-fail-fast"), } } "bench" => { Subcommand::Bench { - paths: paths, + paths, test_args: matches.opt_strs("test-args"), } } @@ -297,12 +297,12 @@ Arguments: } "dist" => { Subcommand::Dist { - paths: paths, + paths, } } "install" => { Subcommand::Install { - paths: paths, + paths, } } _ => { @@ -324,7 +324,7 @@ Arguments: Flags { verbose: matches.opt_count("verbose"), - stage: stage, + stage, on_fail: matches.opt_str("on-fail"), keep_stage: matches.opt_str("keep-stage").map(|j| j.parse().unwrap()), build: matches.opt_str("build").map(|s| INTERNER.intern_string(s)), @@ -333,9 +333,9 @@ Arguments: target: split(matches.opt_strs("target")) .into_iter().map(|x| INTERNER.intern_string(x)).collect::<Vec<_>>(), config: cfg_file, - src: src, + src, jobs: matches.opt_str("jobs").map(|j| j.parse().unwrap()), - cmd: cmd, + cmd, incremental: matches.opt_present("incremental"), } } diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index 1452a38f6ed..17f8bcdf03d 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -314,19 +314,19 @@ impl Build { hosts: config.hosts.clone(), targets: config.targets.clone(), - config: config, - src: src, - out: out, + config, + src, + out, - rust_info: rust_info, - cargo_info: cargo_info, - rls_info: rls_info, + rust_info, + cargo_info, + rls_info, cc: HashMap::new(), cxx: HashMap::new(), crates: HashMap::new(), lldb_version: None, lldb_python_dir: None, - is_sudo: is_sudo, + is_sudo, ci_env: CiEnv::current(), delayed_failures: Cell::new(0), } diff --git a/src/bootstrap/metadata.rs b/src/bootstrap/metadata.rs index ad555be877a..5f1df1d26e2 100644 --- a/src/bootstrap/metadata.rs +++ b/src/bootstrap/metadata.rs @@ -75,10 +75,10 @@ fn build_krate(build: &mut Build, krate: &str) { doc_step: format!("doc-crate-{}", name), test_step: format!("test-crate-{}", name), bench_step: format!("bench-crate-{}", name), - name: name, + name, version: package.version, deps: Vec::new(), - path: path, + path, }); } } |
