Skip to content

compiletest: add a new diff for compare-out-by-lines tests.#155238

Open
Ozzy1423 wants to merge 1 commit intorust-lang:mainfrom
Ozzy1423:diff-by-lines
Open

compiletest: add a new diff for compare-out-by-lines tests.#155238
Ozzy1423 wants to merge 1 commit intorust-lang:mainfrom
Ozzy1423:diff-by-lines

Conversation

@Ozzy1423
Copy link
Copy Markdown
Contributor

Previously, when comparing output by lines, only the actual diff was shown. This is unhelpful since we expect lines to be shuffled around.

With this new print, we can see the exact lines that are missing or have appeared without the noise of the moved around lines.

Example, in this case a note has moved slightly so there is one more separator line "|":

+	   |
+	   = help: maybe it is overwritten before being read?

Compare output by lines enabled, diff by lines:
Expected contains these lines that are not in actual:
(no lines found)
Actual contains these lines that are not in expected:
   |

The actual stderr differed from the expected stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args liveness/liveness-consts.rs`

r? @jieyouxu
cc @zetanumbers @ywxt

Previously, when comparing output by lines, only the actual
diff was shown. This is unhelpful since we expect lines to be
shuffled around.

With this new print, we can see the exact lines that are missing
or have appeared without the noise of the moved around lines.
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 13, 2026

Some changes occurred in src/tools/compiletest

cc @jieyouxu

@rustbot rustbot added A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc labels Apr 13, 2026
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants