-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Make TyKind: Debug
have less verbose output
#111988
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
rustbot
added
A-rustdoc-json
Area: Rustdoc JSON backend
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
WG-trait-system-refactor
The Rustc Trait System Refactor Initiative (-Znext-solver)
labels
May 26, 2023
BoxyUwU
force-pushed
the
make_tykind_debug_good
branch
3 times, most recently
from
May 26, 2023 12:07
a579c84
to
bcc4657
Compare
This comment was marked as off-topic.
This comment was marked as off-topic.
BoxyUwU
force-pushed
the
make_tykind_debug_good
branch
from
May 26, 2023 15:20
bcc4657
to
b7eab00
Compare
This comment has been minimized.
This comment has been minimized.
bjorn3
reviewed
May 26, 2023
bjorn3
reviewed
May 26, 2023
BoxyUwU
force-pushed
the
make_tykind_debug_good
branch
2 times, most recently
from
May 26, 2023 17:23
81d8770
to
2fe943f
Compare
This comment has been minimized.
This comment has been minimized.
BoxyUwU
force-pushed
the
make_tykind_debug_good
branch
from
May 26, 2023 17:36
2fe943f
to
eed2a39
Compare
BoxyUwU
force-pushed
the
make_tykind_debug_good
branch
from
May 26, 2023 17:55
eed2a39
to
976adf3
Compare
BoxyUwU
removed
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
A-rustdoc-json
Area: Rustdoc JSON backend
WG-trait-system-refactor
The Rustc Trait System Refactor Initiative (-Znext-solver)
labels
May 26, 2023
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`
matthiaskrgr
added a commit
to matthiaskrgr/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``
compiler-errors
approved these changes
May 29, 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.
this is fine for now, though notably incomplete until we get <Ty as Debug>
to use <TyKind as Debug>
i think
@bors r+ |
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
May 29, 2023
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
May 29, 2023
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#111558 (Move tests) - rust-lang#111827 (Add build instructions for cranelift backend as part of Rust repo) - rust-lang#111988 (Make `TyKind: Debug` have less verbose output) - rust-lang#112022 (Check nested obligations during coercion unify in new solver) - rust-lang#112057 (Suggest correct `self_ty`) - rust-lang#112063 (Add a test for issue 110457/incremental ICE with closures with the same span) Failed merges: - rust-lang#112068 (Move tests from `ui/discrim` dir) 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.
Current
TyKind: Debug
impl is basically unusable for debugging, its too verbose even for verbose debugging 🤣 This PR replaces the debug logic forTyKind
with a more manual debug impl instead of a hand expanded derived impl. This should help make #107084 more reasonable to land since the output ofTy: Debug
will be better.This isn't a fully completed change to the
Debug
impl ofTyKind
as there's still logic from the derive macro for some variants. Some of the variants are also not consisten with the-Zverbose
printing ofTy
, ideally-Zverbose
printing ofTy
would also just defer to the debug impl instead of having lots of checks in pretty printing. I plan on fixing this in follow up PRs since it seems tricky to do in this one and its already a large PR 😅