Skip to content

compiletest "not found errors" output is badly formatted #140940

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
RalfJung opened this issue May 12, 2025 · 1 comment
Open

compiletest "not found errors" output is badly formatted #140940

RalfJung opened this issue May 12, 2025 · 1 comment
Labels
A-compiletest Area: The compiletest test runner C-bug Category: This is a bug. 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.

Comments

@RalfJung
Copy link
Member

When compiletest encounters "not found errors", its output now looks like this:

--- not found errors (from test file) ---
ERRORline  11: it is undefined behavior to use this value
NOTEline  11: reference to mutable memory
---

That looks glitched out, with the lack of a space before "line". I think the line number should probably come first anyway, before the diagnostic kind.

I think this is a regression, this used to look just fine.

The formatting seems to happen here:

format!("{: <10}line {: >3}: {}", self.kind, self.line_num_str(), self.msg.cyan())

Cc @petrochenkov

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label May 12, 2025
@petrochenkov
Copy link
Contributor

This is fixed in #140622.
You may also be interested in looking at other changes in that PR.

@jieyouxu jieyouxu added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) C-bug Category: This is a bug. A-compiletest Area: The compiletest test runner and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels May 12, 2025
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 C-bug Category: This is a bug. 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.
Projects
None yet
Development

No branches or pull requests

4 participants