Skip to content

Conversation

chenyukang
Copy link
Member

When working on #147354, spent some time to figure out that there is //~ ERROR left on test file, this PR will give a better error message for this scenario.

@rustbot
Copy link
Collaborator

rustbot commented Oct 7, 2025

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 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 Oct 7, 2025
@rustbot
Copy link
Collaborator

rustbot commented Oct 7, 2025

r? @clubby789

rustbot has assigned @clubby789.
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

Copy link
Member

@fmease fmease left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prefix = self.error_prefix(),
n = not_found.len(),
);
if let Some(human_format) = self
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally, we wouldn't check this here but at the place where we actually parse error annotations.

It would be cool if we could reuse the (negated) heuristic inside normalize_output (the let json = … one) but it's probably not feasible presently (and we should wait for the rewrite).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you don't have the time or inclination to try and move it there, that's fine, too. Could you maybe add a FIXME tho?

@fmease
Copy link
Member

fmease commented Oct 7, 2025

If you have the time and energy to properly address #147429 (comment) and #147429 (comment), then please go for it! Otherwise, could you add FIXMEs instead?

Then r=me after squash

@chenyukang chenyukang force-pushed the yukang-fix-test-tip branch from c7cb3ea to 9e1cdf9 Compare October 7, 2025 10:27
@chenyukang chenyukang force-pushed the yukang-fix-test-tip branch from 9e1cdf9 to f8ee9f0 Compare October 7, 2025 10:29
@fmease fmease assigned fmease and unassigned clubby789 Oct 7, 2025
@chenyukang
Copy link
Member Author

Thanks, added FIXME.

@bors r=fmease

@bors
Copy link
Collaborator

bors commented Oct 7, 2025

📌 Commit f8ee9f0 has been approved by fmease

It is now in the queue for this repository.

@bors bors 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 Oct 7, 2025
bors added a commit that referenced this pull request Oct 7, 2025
Rollup of 7 pull requests

Successful merges:

 - #145943 (stdlib docs: document lifetime extension for `format_args!`'s arguments)
 - #147243 (cmse: disallow `impl Trait` in `cmse-nonsecure-entry` return types)
 - #147402 ([rustdoc] Don't serialize & deserialize data that doesn't go OTW)
 - #147418 (Fix target list of `link_section`)
 - #147429 (Print tip for human error format in runtest)
 - #147441 (Fix comments error for Provenance impls)
 - #147442 (c-variadic: fix thir-print for `...` without a pattern)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 2d353c3 into rust-lang:master Oct 7, 2025
10 checks passed
@rustbot rustbot added this to the 1.92.0 milestone Oct 7, 2025
rust-timer added a commit that referenced this pull request Oct 7, 2025
Rollup merge of #147429 - chenyukang:yukang-fix-test-tip, r=fmease

Print tip for human error format in runtest

When working on #147354, spent some time to figure out that there is `//~ ERROR` left on test file, this PR will give a better error message for this scenario.
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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

5 participants