-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Change ty and const error's pretty printing to be in braces #111991
Merged
Merged
Conversation
This file contains 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
compiler-errors
approved these changes
May 26, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me after nit, the general idea of changing the formatting seems fine to me
f382cb1
to
35a2884
Compare
This comment has been minimized.
This comment has been minimized.
35a2884
to
ad77bc8
Compare
@bors r+ rollup |
compiler-errors
added a commit
to compiler-errors/rust
that referenced
this pull request
May 26, 2023
… r=compiler-errors Change ty and const error's pretty printing to be in braces `[const error]` and `[type error]` are slightly confusing since they look like either a slice with an error type for the element ty or a slice with a const argument as the type ???. This PR changes them to display as `{const error}` and `{type error}` similar to `{integer}`. This does not update the `Debug` impls for them which is done in rust-lang#111988. I updated some error logic to avoid printing the substs of trait refs when unable to resolve an assoc item for them, this avoids emitting errors with `{type error}` in them. The substs are not relevant for these errors since we don't take into account the substs when resolving the assoc item. r? `@compiler-errors`
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
May 26, 2023
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#111714 (Stop confusing specification levels when computing expectations.) - rust-lang#111927 (Migrate `item_static` to Askama) - rust-lang#111954 (improve error message for calling a method on a raw pointer with an unknown pointee) - rust-lang#111973 (Update current implementation comments for `select_nth_unstable`) - rust-lang#111976 (Generate docs for bootstrap itself) - rust-lang#111977 (Make errors from `x doc` less verbose) - rust-lang#111987 (do not prefer substs relate during coherence) - rust-lang#111991 (Change ty and const error's pretty printing to be in braces) r? `@ghost` `@rustbot` modify labels: rollup
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
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.
[const error]
and[type error]
are slightly confusing since they look like either a slice with an error type for the element ty or a slice with a const argument as the type ???. This PR changes them to display as{const error}
and{type error}
similar to{integer}
.This does not update the
Debug
impls for them which is done in #111988.I updated some error logic to avoid printing the substs of trait refs when unable to resolve an assoc item for them, this avoids emitting errors with
{type error}
in them. The substs are not relevant for these errors since we don't take into account the substs when resolving the assoc item.r? @compiler-errors