Slightly improve diagnostic impl+output for uncovered type parameters#157677
Slightly improve diagnostic impl+output for uncovered type parameters#157677fmease wants to merge 2 commits into
Conversation
|
This PR modifies |
|
r? @jackh726 rustbot has assigned @jackh726. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment was marked as outdated.
This comment was marked as outdated.
8e9e9c8 to
4726555
Compare
This comment has been minimized.
This comment has been minimized.
|
r=me after rebase |
4726555 to
2fda233
Compare
|
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. |
Moreover, don't add the error code to the lint warning(!). While helpful, it's quite unconventional.
The diagnostic is generally very noisy.
This commit tries to make it slightly less cluttered and more legible by
1. stopping to reuse the lengthy primary message as the primary label.
This duplication didn't increase the information content and only
turned the diagnostic into a letter and symbol soup.
Instead, we now pick a succinct label ("uncovered type parameter")
that immediately(!) signals to the users in red what is wrong with
the highlighted type parameter.
2. breaking some information-dense notes into multiple lines.
Finally, this rephrases the slightly awkward and confusing
"type parameter […] must be used as a type parameter for […] type" to
"type parameter […] must be used as an argument to […] type".
|
@bors r=jackh726 rollup |
…kh726 Slightly improve diagnostic impl+output for uncovered type parameters Split out of PR rust-lang#135910. No behavioral changes. See individual commit messages for details.
|
⌛ Testing commit 2fda233 with merge 4fa96d0... Workflow: https://github.com/rust-lang/rust/actions/runs/27503272216 |
Slightly improve diagnostic impl+output for uncovered type parameters Split out of PR #135910. No behavioral changes. See individual commit messages for details.
…kh726 Slightly improve diagnostic impl+output for uncovered type parameters Split out of PR rust-lang#135910. No behavioral changes. See individual commit messages for details.
|
@bors yield |
|
Auto build was cancelled. Cancelled workflows: The next pull request likely to be tested is #157893. |
Split out of PR #135910. No behavioral changes.
See individual commit messages for details.