Rollup merge of #127512 - eggyal:newline-terminate-print-linkargs, r=compiler-errors

Terminate `--print link-args` output with newline

Fixes #127507
This commit is contained in:
Trevor Gross 2024-07-16 20:10:11 -05:00 committed by GitHub
commit 8840d302e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View File

@ -750,7 +750,7 @@ fn link_natively(
for print in &sess.opts.prints {
if print.kind == PrintKind::LinkArgs {
let content = format!("{cmd:?}");
let content = format!("{cmd:?}\n");
print.out.overwrite(&content, sess);
}
}

View File

@ -17,4 +17,5 @@ fn main() {
.run_unchecked();
out.assert_stdout_contains("lfoo");
out.assert_stdout_contains("lbar");
assert!(out.stdout_utf8().ends_with('\n'));
}