Skip to content

Commit 8840d30

Browse files
authored
Rollup merge of #127512 - eggyal:newline-terminate-print-linkargs, r=compiler-errors
Terminate `--print link-args` output with newline Fixes #127507
2 parents 4013acd + f96f68f commit 8840d30

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Diff for: compiler/rustc_codegen_ssa/src/back/link.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,7 @@ fn link_natively(
750750

751751
for print in &sess.opts.prints {
752752
if print.kind == PrintKind::LinkArgs {
753-
let content = format!("{cmd:?}");
753+
let content = format!("{cmd:?}\n");
754754
print.out.overwrite(&content, sess);
755755
}
756756
}

Diff for: tests/run-make/link-arg/rmake.rs

+1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@ fn main() {
1717
.run_unchecked();
1818
out.assert_stdout_contains("lfoo");
1919
out.assert_stdout_contains("lbar");
20+
assert!(out.stdout_utf8().ends_with('\n'));
2021
}

0 commit comments

Comments
 (0)