Skip to content

Conversation

@ErichDonGubler
Copy link
Member

Connections

Regressed by #8323, which I reviewed. 😅

Description

These error variants use a naive base + offset from user-provided input in order to be diagnostically helpful in Display. Eek! Add a BasePlusOffset structure that can be safely used to show calculations like this, falling back to displaying <overflow> if it doesn't work, and use that instead of the naive addition.

Also, fix up some styling stuff that I noticed was wrong and/or not consistent with other parts of code. See individual commits for more details.

Testing

TBD. I'd like to see a CTS test for this, since this is prime validation coverage that doesn't appear to be tested.

Squash or Rebase?

rebase plz

Checklist

  • If this contains user-facing changes, add a CHANGELOG.md entry.

@ErichDonGubler ErichDonGubler added type: bug Something isn't working PR: needs back-porting PR with a fix that needs to land on crates kind: diagnostics Error message should be better tag: crash Involves a crash or panic labels Jan 3, 2026
@ErichDonGubler
Copy link
Member Author

This is basically ready for review, but I haven't yet determined how I'd like to test this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind: diagnostics Error message should be better PR: needs back-porting PR with a fix that needs to land on crates tag: crash Involves a crash or panic type: bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant