Skip to content

Commit e76c484

Browse files
committed
Remove the unused extra_features field from tool_extended!
This field was introduced in rust-lang#48097 to support the "clippy" feature of RLS.
1 parent c528b8c commit e76c484

File tree

4 files changed

+18
-46
lines changed

4 files changed

+18
-46
lines changed

src/bootstrap/src/core/build_steps/dist.rs

+7-11
Original file line numberDiff line numberDiff line change
@@ -1152,7 +1152,7 @@ impl Step for Rls {
11521152
let compiler = self.compiler;
11531153
let target = self.target;
11541154

1155-
let rls = builder.ensure(tool::Rls { compiler, target, extra_features: Vec::new() });
1155+
let rls = builder.ensure(tool::Rls { compiler, target });
11561156

11571157
let mut tarball = Tarball::new(builder, "rls", &target.triple);
11581158
tarball.set_overlay(OverlayKind::Rls);
@@ -1239,9 +1239,8 @@ impl Step for Clippy {
12391239
// Prepare the image directory
12401240
// We expect clippy to build, because we've exited this step above if tool
12411241
// state for clippy isn't testing.
1242-
let clippy = builder.ensure(tool::Clippy { compiler, target, extra_features: Vec::new() });
1243-
let cargoclippy =
1244-
builder.ensure(tool::CargoClippy { compiler, target, extra_features: Vec::new() });
1242+
let clippy = builder.ensure(tool::Clippy { compiler, target });
1243+
let cargoclippy = builder.ensure(tool::CargoClippy { compiler, target });
12451244

12461245
let mut tarball = Tarball::new(builder, "clippy", &target.triple);
12471246
tarball.set_overlay(OverlayKind::Clippy);
@@ -1290,9 +1289,8 @@ impl Step for Miri {
12901289
let compiler = self.compiler;
12911290
let target = self.target;
12921291

1293-
let miri = builder.ensure(tool::Miri { compiler, target, extra_features: Vec::new() });
1294-
let cargomiri =
1295-
builder.ensure(tool::CargoMiri { compiler, target, extra_features: Vec::new() });
1292+
let miri = builder.ensure(tool::Miri { compiler, target });
1293+
let cargomiri = builder.ensure(tool::CargoMiri { compiler, target });
12961294

12971295
let mut tarball = Tarball::new(builder, "miri", &target.triple);
12981296
tarball.set_overlay(OverlayKind::Miri);
@@ -1423,10 +1421,8 @@ impl Step for Rustfmt {
14231421
let compiler = self.compiler;
14241422
let target = self.target;
14251423

1426-
let rustfmt =
1427-
builder.ensure(tool::Rustfmt { compiler, target, extra_features: Vec::new() });
1428-
let cargofmt =
1429-
builder.ensure(tool::Cargofmt { compiler, target, extra_features: Vec::new() });
1424+
let rustfmt = builder.ensure(tool::Rustfmt { compiler, target });
1425+
let cargofmt = builder.ensure(tool::Cargofmt { compiler, target });
14301426
let mut tarball = Tarball::new(builder, "rustfmt", &target.triple);
14311427
tarball.set_overlay(OverlayKind::Rustfmt);
14321428
tarball.is_preview(true);

src/bootstrap/src/core/build_steps/test.rs

+4-12
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ impl Step for Rustfmt {
409409
let host = self.host;
410410
let compiler = builder.compiler(stage, host);
411411

412-
builder.ensure(tool::Rustfmt { compiler, target: self.host, extra_features: Vec::new() });
412+
builder.ensure(tool::Rustfmt { compiler, target: self.host });
413413

414414
let mut cargo = tool::prepare_tool_cargo(
415415
builder,
@@ -511,17 +511,9 @@ impl Step for Miri {
511511
let host_compiler = builder.compiler(stage - 1, host);
512512

513513
// Build our tools.
514-
let miri = builder.ensure(tool::Miri {
515-
compiler: host_compiler,
516-
target: host,
517-
extra_features: Vec::new(),
518-
});
514+
let miri = builder.ensure(tool::Miri { compiler: host_compiler, target: host });
519515
// the ui tests also assume cargo-miri has been built
520-
builder.ensure(tool::CargoMiri {
521-
compiler: host_compiler,
522-
target: host,
523-
extra_features: Vec::new(),
524-
});
516+
builder.ensure(tool::CargoMiri { compiler: host_compiler, target: host });
525517

526518
// We also need sysroots, for Miri and for the host (the latter for build scripts).
527519
// This is for the tests so everything is done with the target compiler.
@@ -740,7 +732,7 @@ impl Step for Clippy {
740732
let host = self.host;
741733
let compiler = builder.compiler(stage, host);
742734

743-
builder.ensure(tool::Clippy { compiler, target: self.host, extra_features: Vec::new() });
735+
builder.ensure(tool::Clippy { compiler, target: self.host });
744736
let mut cargo = tool::prepare_tool_cargo(
745737
builder,
746738
compiler,

src/bootstrap/src/core/build_steps/tool.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -1021,7 +1021,6 @@ macro_rules! tool_extended {
10211021
pub struct $name {
10221022
pub compiler: Compiler,
10231023
pub target: TargetSelection,
1024-
pub extra_features: Vec<String>,
10251024
}
10261025

10271026
impl Step for $name {
@@ -1051,7 +1050,6 @@ macro_rules! tool_extended {
10511050
run.builder.ensure($name {
10521051
compiler: run.builder.compiler(run.builder.top_stage, run.builder.config.build),
10531052
target: run.target,
1054-
extra_features: Vec::new(),
10551053
});
10561054
}
10571055

@@ -1063,7 +1061,7 @@ macro_rules! tool_extended {
10631061
tool: $tool_name,
10641062
mode: if false $(|| $tool_std)? { Mode::ToolStd } else { Mode::ToolRustc },
10651063
path: $path,
1066-
extra_features: $sel.extra_features,
1064+
extra_features: vec![],
10671065
source_type: SourceType::InTree,
10681066
allow_features: concat!($($allow_features)*),
10691067
cargo_args: vec![]

src/bootstrap/src/core/builder/mod.rs

+6-20
Original file line numberDiff line numberDiff line change
@@ -1339,16 +1339,9 @@ impl<'a> Builder<'a> {
13391339
}
13401340

13411341
let build_compiler = self.compiler(run_compiler.stage - 1, self.build.build);
1342-
self.ensure(tool::Clippy {
1343-
compiler: build_compiler,
1344-
target: self.build.build,
1345-
extra_features: vec![],
1346-
});
1347-
let cargo_clippy = self.ensure(tool::CargoClippy {
1348-
compiler: build_compiler,
1349-
target: self.build.build,
1350-
extra_features: vec![],
1351-
});
1342+
self.ensure(tool::Clippy { compiler: build_compiler, target: self.build.build });
1343+
let cargo_clippy =
1344+
self.ensure(tool::CargoClippy { compiler: build_compiler, target: self.build.build });
13521345
let mut dylib_path = helpers::dylib_path();
13531346
dylib_path.insert(0, self.sysroot(run_compiler).join("lib"));
13541347

@@ -1363,16 +1356,9 @@ impl<'a> Builder<'a> {
13631356
let build_compiler = self.compiler(run_compiler.stage - 1, self.build.build);
13641357

13651358
// Prepare the tools
1366-
let miri = self.ensure(tool::Miri {
1367-
compiler: build_compiler,
1368-
target: self.build.build,
1369-
extra_features: Vec::new(),
1370-
});
1371-
let cargo_miri = self.ensure(tool::CargoMiri {
1372-
compiler: build_compiler,
1373-
target: self.build.build,
1374-
extra_features: Vec::new(),
1375-
});
1359+
let miri = self.ensure(tool::Miri { compiler: build_compiler, target: self.build.build });
1360+
let cargo_miri =
1361+
self.ensure(tool::CargoMiri { compiler: build_compiler, target: self.build.build });
13761362
// Invoke cargo-miri, make sure it can find miri and cargo.
13771363
let mut cmd = command(cargo_miri);
13781364
cmd.env("MIRI", &miri);

0 commit comments

Comments
 (0)