-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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::Adt
's Debug
impl be more pretty
#115873
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
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.
labels
Sep 15, 2023
This comment has been minimized.
This comment has been minimized.
r=me with mir opts blessed @bors rollup |
BoxyUwU
force-pushed
the
tykind_adt_debug
branch
from
September 15, 2023 15:32
1106e92
to
7a7b4f3
Compare
@bors r=oil-ok |
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
Sep 15, 2023
bors
added
S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
and removed
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
labels
Sep 15, 2023
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-author
Status: This is awaiting some action (such as code changes or more information) from the author.
labels
Sep 15, 2023
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Sep 16, 2023
…iaskrgr Rollup of 2 pull requests Successful merges: - rust-lang#115607 (clarify that unsafe code must not rely on our safe traits) - rust-lang#115866 (make interpreter and TyAndLayout type Debug impl independent of Ty debug impl) Failed merges: - rust-lang#115873 (Make `TyKind::Adt`'s `Debug` impl be more pretty) - rust-lang#115884 (make ty::Const debug printing less verbose) r? `@ghost` `@rustbot` modify labels: rollup
☔ The latest upstream changes (presumably #115889) made this pull request unmergeable. Please resolve the merge conflicts. |
bors
added
S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
and removed
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
labels
Sep 16, 2023
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Sep 16, 2023
…iaskrgr Rollup of 3 pull requests Successful merges: - rust-lang#115860 (Enable varargs support for AAPCS calling convention) - rust-lang#115867 (coverage: Simplify internal representation of debug types) - rust-lang#115885 (don't globally ignore rustc-ice files) Failed merges: - rust-lang#115873 (Make `TyKind::Adt`'s `Debug` impl be more pretty) - rust-lang#115884 (make ty::Const debug printing less verbose) r? `@ghost` `@rustbot` modify labels: rollup
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Sep 16, 2023
make ty::Const debug printing less verbose Similar in spirit to rust-lang#115873
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Sep 16, 2023
Rollup merge of rust-lang#115884 - RalfJung:const-debug-print, r=oli-obk make ty::Const debug printing less verbose Similar in spirit to rust-lang#115873
BoxyUwU
force-pushed
the
tykind_adt_debug
branch
from
September 18, 2023 16:46
7a7b4f3
to
b2bf4b6
Compare
@bors r=oli-obk |
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-author
Status: This is awaiting some action (such as code changes or more information) from the author.
labels
Sep 18, 2023
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Sep 19, 2023
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#115869 (Avoid blessing cargo deps's source code in ui tests) - rust-lang#115873 (Make `TyKind::Adt`'s `Debug` impl be more pretty) - rust-lang#115879 (Migrate diagnostics in `hir_typeck/src/cast.rs`) - rust-lang#115930 (coverage: Fix an unstable-sort inconsistency in coverage spans) - rust-lang#115931 (Move mobile topbar title creation entirely into JS) - rust-lang#115941 (Add myself to .mailmap) - rust-lang#115943 (compiletest: Don't swallow some error messages.) - rust-lang#115949 (Update browser-ui-test version) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Sep 19, 2023
Rollup merge of rust-lang#115873 - BoxyUwU:tykind_adt_debug, r=oli-obk Make `TyKind::Adt`'s `Debug` impl be more pretty Currently `{:?}` on `Ty` for a `TyKind::Adt` would print as `Adt(Foo, [])`. This PR changes it to be `Foo` when there are no generics or `Foo<T>`/`Foo<T, U>` when there _are_ generics. Example from debug log: `├─0ms DEBUG rustc_hir_analysis::astconv return=Bar<T/#0, U/#1>` I should have done this in my initial PR for a prettier TyKind: Debug impl but I thought I would need to be accessing generics_of to figure out where in the "path" the generics would have to go??? but no, adts literally only have a single place the generics can go (on the end). Feel a bit silly about this :) r? `@oli-obk`
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.
Currently
{:?}
onTy
for aTyKind::Adt
would print asAdt(Foo, [])
. This PR changes it to beFoo
when there are no generics orFoo<T>
/Foo<T, U>
when there are generics. Example from debug log:├─0ms DEBUG rustc_hir_analysis::astconv return=Bar<T/#0, U/#1>
I should have done this in my initial PR for a prettier TyKind: Debug impl but I thought I would need to be accessing generics_of to figure out where in the "path" the generics would have to go??? but no, adts literally only have a single place the generics can go (on the end). Feel a bit silly about this :)
r? @oli-obk