Commit 00efc94
authored
Rollup merge of rust-lang#113189 - Zalathar:trim-end, r=ozkanonur
compiletest: Only trim the end of process output
As of rust-lang#94196, compiletest automatically trims process stderr/stdout output before printing it, to make failure info more compact.
This causes the first line of `run-coverage` output to be displayed incorrectly, because it uses leading whitespace to align line numbers.
Trimming only the end of the output string should still have the intended effect (e.g. removing trailing newlines), without causing problems for output that deliberately uses leading whitespace on the first line.
## Before
```
--- stdout -------------------------------
1| 1|fn main() { //
2| 1| let num = 9;
3| 1| while num >= 10 {
4| 0| }
5| 1|}
------------------------------------------
stderr: none
```
## After
```
--- stdout -------------------------------
1| 1|fn main() { //
2| 1| let num = 9;
3| 1| while num >= 10 {
4| 0| }
5| 1|}
------------------------------------------
stderr: none
```1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4374 | 4374 | | |
4375 | 4375 | | |
4376 | 4376 | | |
4377 | | - | |
| 4377 | + | |
4378 | 4378 | | |
4379 | 4379 | | |
4380 | 4380 | | |
| |||
0 commit comments