Skip to content

Fix unstable diagnostics in tests - #157299

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
zetanumbers:fix-unstable-diagnostics-in-tests
Jun 8, 2026
Merged

Fix unstable diagnostics in tests#157299
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
zetanumbers:fix-unstable-diagnostics-in-tests

Conversation

@zetanumbers

@zetanumberszetanumbers commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

The main inconsistency in changed tests happens when subdiagnostic pads the main diagnostic with an empty source line (aka "|"). Meanwhile the parallel frontend might bunch subdiagnostics on a single primary diagnostic, removing padding from some other one. So we can just ignore "|" lines.

Updates #154314
Reverts #157103

@rustbot

Copy link
Copy Markdown
Collaborator

Some changes occurred in src/tools/compiletest

cc @jieyouxu

@rustbotrustbot added the A-compiletest Area: The compiletest test runner label Jun 2, 2026
@rustbotrustbot added 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) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 2, 2026
@rustbot

Copy link
Copy Markdown
Collaborator

r? @nnethercote

rustbot has assigned @nnethercote.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 73 candidates
  • Random selection from 17 candidates

Comment threadsrc/tools/compiletest/src/runtest.rs
@petrochenkovpetrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 3, 2026
@zetanumbers
zetanumbersforce-pushed the fix-unstable-diagnostics-in-tests branch from dd70bf6 to 5dae13bCompareJune 8, 2026 09:40
@rustbot

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@zetanumbers

Copy link
Copy Markdown
ContributorAuthor

@rustbot ready

@rustbotrustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 8, 2026
@rust-log-analyzer

This comment has been minimized.

@petrochenkov

Copy link
Copy Markdown
Contributor

r=me after fixing CI and squashing commits.
@rustbot author

@rustbotrustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 8, 2026
@rustbot

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@rustbotrustbot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jun 8, 2026
@zetanumbers

Copy link
Copy Markdown
ContributorAuthor

@rustbot ready

@rustbotrustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 8, 2026
Inconsistency happens when subdiagnostic pads the main diagnostic with
an empty source line (aka "|"). Meanwhile the parallel frontend might
bunch subdiagnostics on a single primary diagnostic, removing padding
from some other one.
Revert "Update reproducibly failing tests when parallel frontend is enabled"
This reverts commit f582193.
Apply a test directive format suggested by a reviewer
Bless thine tests
@zetanumbers
zetanumbersforce-pushed the fix-unstable-diagnostics-in-tests branch from 7b7d73a to 30451d6CompareJune 8, 2026 10:32
@petrochenkov

Copy link
Copy Markdown
Contributor

@bors r+

@rust-bors

rust-borsBot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 30451d6 has been approved by petrochenkov

It is now in the queue for this repository.

@rust-borsrust-borsBot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 8, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 8, 2026
…cs-in-tests, r=petrochenkov
Fix unstable diagnostics in tests
The main inconsistency in changed tests happens when subdiagnostic pads the main diagnostic with an empty source line (aka "|"). Meanwhile the parallel frontend might bunch subdiagnostics on a single primary diagnostic, removing padding from some other one. So we can just ignore "|" lines.
Updates rust-lang#154314
Reverts rust-lang#157103
This was referenced Jun 8, 2026
rust-borsBot pushed a commit that referenced this pull request Jun 8, 2026
…uwer
Rollup of 13 pull requests
Successful merges:
- #147302 (asm! support for the Xtensa architecture)
- #148820 (Add very basic "comptime" fn implementation)
- #157299 (Fix unstable diagnostics in tests)
- #143511 (Improve TLS codegen by marking the panic/init path as cold)
- #154608 (Add `_value` API for number literals in proc-macro)
- #156762 (xfs support in `test_rename_directory_to_non_empty_directory`)
- #157300 (Relax test requirements for consistency)
- #157383 (tests: codegen-llvm: Ignore BPF targets in c-variadic-opt)
- #157413 (fix: don't suggest .into_iter() for .cloned()/.copied() on non-reference Option)
- #157578 (Fix diagnostics for non-exhaustive destructuring assignments (#157553))
- #157587 (explain that the size_of constant also serves to avoid optimizing away 'unused' size_of calls)
- #157596 (test: remove ineffective link-extern-crate-with-drop-type test)
- #157602 (rustdoc: Remove unnecessary fast path)
@rust-bors
rust-borsBot merged commit e2cb4a4 into rust-lang:mainJun 8, 2026
12 checks passed
@rustbotrustbot added this to the 1.98.0 milestone Jun 8, 2026
rust-timer added a commit that referenced this pull request Jun 8, 2026
Rollup merge of #157299 - zetanumbers:fix-unstable-diagnostics-in-tests, r=petrochenkov
Fix unstable diagnostics in tests
The main inconsistency in changed tests happens when subdiagnostic pads the main diagnostic with an empty source line (aka "|"). Meanwhile the parallel frontend might bunch subdiagnostics on a single primary diagnostic, removing padding from some other one. So we can just ignore "|" lines.
Updates #154314
Reverts #157103
flip1995 pushed a commit to flip1995/rust-clippy that referenced this pull request Aug 17, 2026
…uwer
Rollup of 13 pull requests
Successful merges:
- rust-lang/rust#147302 (asm! support for the Xtensa architecture)
- rust-lang/rust#148820 (Add very basic "comptime" fn implementation)
- rust-lang/rust#157299 (Fix unstable diagnostics in tests)
- rust-lang/rust#143511 (Improve TLS codegen by marking the panic/init path as cold)
- rust-lang/rust#154608 (Add `_value` API for number literals in proc-macro)
- rust-lang/rust#156762 (xfs support in `test_rename_directory_to_non_empty_directory`)
- rust-lang/rust#157300 (Relax test requirements for consistency)
- rust-lang/rust#157383 (tests: codegen-llvm: Ignore BPF targets in c-variadic-opt)
- rust-lang/rust#157413 (fix: don't suggest .into_iter() for .cloned()/.copied() on non-reference Option)
- rust-lang/rust#157578 (Fix diagnostics for non-exhaustive destructuring assignments (rust-lang/rust#157553))
- rust-lang/rust#157587 (explain that the size_of constant also serves to avoid optimizing away 'unused' size_of calls)
- rust-lang/rust#157596 (test: remove ineffective link-extern-crate-with-drop-type test)
- rust-lang/rust#157602 (rustdoc: Remove unnecessary fast path)
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-compiletestArea: The compiletest test runnerA-testsuiteArea: The testsuite used to check the correctness of rustcS-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@zetanumbers@rustbot@rust-log-analyzer@petrochenkov@nnethercote