Make "long type" printing type aware and trim types in E0275#104469
Merged
bors merged 5 commits intorust-lang:masterfrom Nov 19, 2022
Merged
Make "long type" printing type aware and trim types in E0275#104469bors merged 5 commits intorust-lang:masterfrom
bors merged 5 commits intorust-lang:masterfrom
Conversation
Collaborator
|
r? @TaKO8Ki (rustbot has picked a reviewer for you, use r? to override) |
This comment was marked as resolved.
This comment was marked as resolved.
Contributor
|
r? @oli-obk |
Contributor
Author
|
@bors r=oli-obk |
Collaborator
|
📌 Commit ec27227139812ddd22dc5294149047b42fde22ef has been approved by It is now in the queue for this repository. |
Collaborator
|
☔ The latest upstream changes (presumably #104555) made this pull request unmergeable. Please resolve the merge conflicts. |
Instead of simple string cutting, use a custom printer to hide parts of long printed types.
When printing requirement overflow errors, do not print out the full type name when it is longer than 50 characters long.
`_` might confuse people into believing that the type isn't known, while `...` is not used anywhere else for types and is not valid syntax, making it more likely to convey the right understanding.
Contributor
Author
|
@bors r=oli-obk |
Collaborator
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Nov 19, 2022
…iaskrgr Rollup of 10 pull requests Successful merges: - rust-lang#103117 (Use `IsTerminal` in place of `atty`) - rust-lang#103969 (Partial support for running UI tests with `download-rustc`) - rust-lang#103989 (Fix build of std for thumbv7a-pc-windows-msvc) - rust-lang#104076 (fix sysroot issue which appears for ci downloaded rustc) - rust-lang#104469 (Make "long type" printing type aware and trim types in E0275) - rust-lang#104497 (detect () to avoid redundant <> suggestion for type) - rust-lang#104577 (Don't focus on notable trait parent when hiding it) - rust-lang#104587 (Update cargo) - rust-lang#104593 (Improve spans for RPITIT object-safety errors) - rust-lang#104604 (Migrate top buttons style to CSS variables) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Instead of simple string cutting, use a custom printer to hide parts of long printed types.
On E0275, check for type length before printing.