Skip to content

Commit 21d8f48

Browse files
authored
Rollup merge of #100832 - ehuss:bootstrap-cleanup, r=jyn514
Some small bootstrap cleanup This is a collection of a few small cleanups. See commits for more details. * Remove some unused fields from the tool_extended macro. * Remove rustfmt from publish_toolstate. * Remove Steve from toolstate failure notices. * Don't allow rustfmt to fail on dist.
2 parents 579dfa4 + 757913d commit 21d8f48

File tree

3 files changed

+14
-27
lines changed

3 files changed

+14
-27
lines changed

src/bootstrap/dist.rs

+2-9
Original file line numberDiff line numberDiff line change
@@ -1226,17 +1226,10 @@ impl Step for Rustfmt {
12261226

12271227
let rustfmt = builder
12281228
.ensure(tool::Rustfmt { compiler, target, extra_features: Vec::new() })
1229-
.or_else(|| {
1230-
missing_tool("Rustfmt", builder.build.config.missing_tools);
1231-
None
1232-
})?;
1229+
.expect("rustfmt expected to build - essential tool");
12331230
let cargofmt = builder
12341231
.ensure(tool::Cargofmt { compiler, target, extra_features: Vec::new() })
1235-
.or_else(|| {
1236-
missing_tool("Cargofmt", builder.build.config.missing_tools);
1237-
None
1238-
})?;
1239-
1232+
.expect("cargo fmt expected to build - essential tool");
12401233
let mut tarball = Tarball::new(builder, "rustfmt", &target.triple);
12411234
tarball.set_overlay(OverlayKind::Rustfmt);
12421235
tarball.is_preview(true);

src/bootstrap/tool.rs

+8-11
Original file line numberDiff line numberDiff line change
@@ -778,12 +778,10 @@ impl Step for RustAnalyzerProcMacroSrv {
778778
macro_rules! tool_extended {
779779
(($sel:ident, $builder:ident),
780780
$($name:ident,
781-
$toolstate:ident,
782781
$path:expr,
783782
$tool_name:expr,
784783
stable = $stable:expr,
785784
$(in_tree = $in_tree:expr,)?
786-
$(submodule = $submodule:literal,)?
787785
$(tool_std = $tool_std:literal,)?
788786
$extra_deps:block;)+) => {
789787
$(
@@ -828,7 +826,6 @@ macro_rules! tool_extended {
828826
#[allow(unused_mut)]
829827
fn run(mut $sel, $builder: &Builder<'_>) -> Option<PathBuf> {
830828
$extra_deps
831-
$( $builder.update_submodule(&Path::new("src").join("tools").join($submodule)); )?
832829
$builder.ensure(ToolBuild {
833830
compiler: $sel.compiler,
834831
target: $sel.target,
@@ -854,12 +851,12 @@ macro_rules! tool_extended {
854851
// Note: Most submodule updates for tools are handled by bootstrap.py, since they're needed just to
855852
// invoke Cargo to build bootstrap. See the comment there for more details.
856853
tool_extended!((self, builder),
857-
Cargofmt, rustfmt, "src/tools/rustfmt", "cargo-fmt", stable=true, in_tree=true, {};
858-
CargoClippy, clippy, "src/tools/clippy", "cargo-clippy", stable=true, in_tree=true, {};
859-
Clippy, clippy, "src/tools/clippy", "clippy-driver", stable=true, in_tree=true, {};
860-
Miri, miri, "src/tools/miri", "miri", stable=false, {};
861-
CargoMiri, miri, "src/tools/miri/cargo-miri", "cargo-miri", stable=false, {};
862-
Rls, rls, "src/tools/rls", "rls", stable=true, {
854+
Cargofmt, "src/tools/rustfmt", "cargo-fmt", stable=true, in_tree=true, {};
855+
CargoClippy, "src/tools/clippy", "cargo-clippy", stable=true, in_tree=true, {};
856+
Clippy, "src/tools/clippy", "clippy-driver", stable=true, in_tree=true, {};
857+
Miri, "src/tools/miri", "miri", stable=false, {};
858+
CargoMiri, "src/tools/miri/cargo-miri", "cargo-miri", stable=false, {};
859+
Rls, "src/tools/rls", "rls", stable=true, {
863860
builder.ensure(Clippy {
864861
compiler: self.compiler,
865862
target: self.target,
@@ -870,8 +867,8 @@ tool_extended!((self, builder),
870867
// FIXME: tool_std is not quite right, we shouldn't allow nightly features.
871868
// But `builder.cargo` doesn't know how to handle ToolBootstrap in stages other than 0,
872869
// and this is close enough for now.
873-
RustDemangler, rust_demangler, "src/tools/rust-demangler", "rust-demangler", stable=false, in_tree=true, tool_std=true, {};
874-
Rustfmt, rustfmt, "src/tools/rustfmt", "rustfmt", stable=true, in_tree=true, {};
870+
RustDemangler, "src/tools/rust-demangler", "rust-demangler", stable=false, in_tree=true, tool_std=true, {};
871+
Rustfmt, "src/tools/rustfmt", "rustfmt", stable=true, in_tree=true, {};
875872
);
876873

877874
impl<'a> Builder<'a> {

src/tools/publish_toolstate.py

+4-7
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,18 @@
3232
MAINTAINERS = {
3333
'miri': {'oli-obk', 'RalfJung'},
3434
'rls': {'Xanewok'},
35-
'rustfmt': {'topecongiro', 'calebcartwright'},
36-
'book': {'carols10cents', 'steveklabnik'},
35+
'book': {'carols10cents'},
3736
'nomicon': {'frewsxcv', 'Gankra', 'JohnTitor'},
38-
'reference': {'steveklabnik', 'Havvy', 'matthewjasper', 'ehuss'},
39-
'rust-by-example': {'steveklabnik', 'marioidival'},
37+
'reference': {'Havvy', 'matthewjasper', 'ehuss'},
38+
'rust-by-example': {'marioidival'},
4039
'embedded-book': {'adamgreig', 'andre-richter', 'jamesmunns', 'therealprof'},
41-
'edition-guide': {'ehuss', 'steveklabnik'},
40+
'edition-guide': {'ehuss'},
4241
'rustc-dev-guide': {'spastorino', 'amanjeev', 'JohnTitor'},
4342
}
4443

4544
LABELS = {
4645
'miri': ['A-miri', 'C-bug'],
4746
'rls': ['A-rls', 'C-bug'],
48-
'rustfmt': ['A-rustfmt', 'C-bug'],
4947
'book': ['C-bug'],
5048
'nomicon': ['C-bug'],
5149
'reference': ['C-bug'],
@@ -58,7 +56,6 @@
5856
REPOS = {
5957
'miri': 'https://github.com/rust-lang/miri',
6058
'rls': 'https://github.com/rust-lang/rls',
61-
'rustfmt': 'https://github.com/rust-lang/rustfmt',
6259
'book': 'https://github.com/rust-lang/book',
6360
'nomicon': 'https://github.com/rust-lang/nomicon',
6461
'reference': 'https://github.com/rust-lang/reference',

0 commit comments

Comments
 (0)