Skip to content

Commit a9baa16

Browse files
committed
Auto merge of rust-lang#112152 - jyn514:doc-msg, r=clubby789
Fix the progress message for `x doc rustc` This makes it more clear that we're using stage 0 *to document* rustc, not that we're documenting stage0 rustc itself. It also fixes a bug in `msg_sysroot_tool` that would print `Docing`, and removes the `Debug` impl for `Kind` to make sure it doesn't happen again. Before: ``` Documenting stage0 compiler {rustc-main} (aarch64-apple-darwin) ``` After: ``` Documenting compiler {rustc-main} (stage0 -> stage1, aarch64-apple-darwin) ``` thanks `@BoxyUwU` for catching this!
2 parents 0939ec1 + 38c0ba7 commit a9baa16

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

Diff for: src/bootstrap/builder.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ impl<'a> ShouldRun<'a> {
571571
}
572572
}
573573

574-
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Debug, ValueEnum)]
574+
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, ValueEnum)]
575575
pub enum Kind {
576576
#[clap(alias = "b")]
577577
Build,
@@ -642,7 +642,10 @@ impl Kind {
642642
Kind::Doc => "Documenting",
643643
Kind::Run => "Running",
644644
Kind::Suggest => "Suggesting",
645-
_ => return format!("{self:?}"),
645+
_ => {
646+
let title_letter = self.as_str()[0..1].to_ascii_uppercase();
647+
return format!("{title_letter}{}ing", &self.as_str()[1..]);
648+
}
646649
}
647650
.to_owned()
648651
}

Diff for: src/bootstrap/doc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ impl Step for Rustc {
680680
let compiler = builder.compiler(stage, builder.config.build);
681681
builder.ensure(compile::Std::new(compiler, builder.config.build));
682682

683-
let _guard = builder.msg(
683+
let _guard = builder.msg_sysroot_tool(
684684
Kind::Doc,
685685
stage,
686686
&format!("compiler{}", crate_description(&self.crates)),

Diff for: src/bootstrap/lib.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1045,8 +1045,8 @@ impl Build {
10451045
what: impl Display,
10461046
target: TargetSelection,
10471047
) -> Option<gha::Group> {
1048-
let action = action.into();
1049-
let msg = format!("{action:?}ing {what} for {target}");
1048+
let action = action.into().description();
1049+
let msg = format!("{action} {what} for {target}");
10501050
self.group(&msg)
10511051
}
10521052

@@ -1058,8 +1058,8 @@ impl Build {
10581058
host: TargetSelection,
10591059
target: TargetSelection,
10601060
) -> Option<gha::Group> {
1061-
let action = action.into();
1062-
let msg = |fmt| format!("{action:?}ing {what} {fmt}");
1061+
let action = action.into().description();
1062+
let msg = |fmt| format!("{action} {what} {fmt}");
10631063
let msg = if host == target {
10641064
msg(format_args!("(stage{stage} -> stage{}, {target})", stage + 1))
10651065
} else {

0 commit comments

Comments
 (0)