Skip to content

Commit 85274eb

Browse files
committed
Fix spacing when testing individual crates
1 parent d598209 commit 85274eb

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ pub fn crate_description(crates: &[impl AsRef<str>]) -> String {
295295
return "".into();
296296
}
297297

298-
let mut descr = String::from(" {");
298+
let mut descr = String::from("{");
299299
descr.push_str(crates[0].as_ref());
300300
for krate in &crates[1..] {
301301
descr.push_str(", ");

src/bootstrap/src/core/builder/tests.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2017,9 +2017,10 @@ mod snapshot {
20172017
[test] CoverageRunRustdoc <host>
20182018
[test] Pretty <host>
20192019
[build] rustc 1 <host> -> std 1 <host>
2020+
[build] rustc 0 <host> -> std 0 <host>
2021+
[build] rustdoc 0 <host>
20202022
[test] CrateLibrustc <host>
20212023
[build] rustc 1 <host> -> rustc 2 <host>
2022-
[build] rustdoc 0 <host>
20232024
[test] crate-bootstrap <host> src/tools/coverage-dump
20242025
[test] crate-bootstrap <host> src/tools/jsondoclint
20252026
[test] crate-bootstrap <host> src/tools/replace-version-placeholder
@@ -2054,7 +2055,7 @@ mod snapshot {
20542055
[doc] rustc (book) <host>
20552056
[test] rustc 1 <host> -> lint-docs 2 <host>
20562057
[doc] rustc 1 <host> -> std 1 <host> crates=[]
2057-
[test] rustc 1 <host> -> rustdoc-js-std 2 <host>
2058+
[test] rustdoc-js-std 1 <host>
20582059
[build] rustc 0 <host> -> RustdocTheme 1 <host>
20592060
[test] rustdoc-theme 1 <host>
20602061
[test] RustdocUi <host>

src/bootstrap/src/lib.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1144,14 +1144,18 @@ impl Build {
11441144
};
11451145

11461146
let action = action.into().description();
1147-
let msg = |fmt| format!("{action} stage{actual_stage} {what}{fmt}");
1147+
let what = what.to_string();
1148+
let msg = |fmt| {
1149+
let space = if !what.is_empty() { " " } else { "" };
1150+
format!("{action} stage{actual_stage} {what}{space}{fmt}")
1151+
};
11481152
let msg = if let Some(target) = target.into() {
11491153
let build_stage = host_and_stage.stage;
11501154
let host = host_and_stage.host;
11511155
if host == target {
1152-
msg(format_args!(" (stage{build_stage} -> stage{actual_stage}, {target})"))
1156+
msg(format_args!("(stage{build_stage} -> stage{actual_stage}, {target})"))
11531157
} else {
1154-
msg(format_args!(" (stage{build_stage}:{host} -> stage{actual_stage}:{target})"))
1158+
msg(format_args!("(stage{build_stage}:{host} -> stage{actual_stage}:{target})"))
11551159
}
11561160
} else {
11571161
msg(format_args!(""))

0 commit comments

Comments
 (0)