Skip to content
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

debug format Const's less verbosely #111630

Merged
merged 2 commits into from
May 17, 2023

Conversation

BoxyUwU
Copy link
Member

@BoxyUwU BoxyUwU commented May 16, 2023

Not user visible change only visible to people debugging const generics.

Currently debug output for ty::Const is super verbose (even for -Zverbose lol), things like printing infer vars as Infer(Var(?0c)) instead of just ?0c, bound vars and placeholders not using ^0_1 or !0_1 syntax respectively. With these changes its imo better but not perfect:
Const { ty: usize, kind: ^0_1 }
is still a lot for not much information. not entirely sure what to do about that so not dealing with it yet.

Need to do formatting for ConstKind::Expr at some point too since rn it sucks (doesn't even print anything with Display) not gonna do that in this PR either.

r? @compiler-errors

@rustbot 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 May 16, 2023
@compiler-errors
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented May 16, 2023

📌 Commit ea57898 has been approved by compiler-errors

It is now in the queue for this repository.

@bors 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 16, 2023
@rust-log-analyzer

This comment has been minimized.

@compiler-errors
Copy link
Member

@bors r-

r=me tests blessed

@bors 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 May 16, 2023
@BoxyUwU
Copy link
Member Author

BoxyUwU commented May 16, 2023

@bors r=compiler-errors

@bors
Copy link
Contributor

bors commented May 16, 2023

📌 Commit d983b11 has been approved by compiler-errors

It is now in the queue for this repository.

@bors 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 May 16, 2023
@rust-log-analyzer

This comment has been minimized.

Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request May 16, 2023
… r=compiler-errors

debug format `Const`'s less verbosely

Not user visible change only visible to people debugging const generics.

Currently debug output for `ty::Const` is super verbose (even for `-Zverbose` lol), things like printing infer vars as `Infer(Var(?0c))` instead of just `?0c`, bound vars and placeholders not using `^0_1` or `!0_1` syntax respectively. With these changes its imo better but not perfect:
`Const { ty: usize, kind: ^0_1 }`
is still a lot for not much information. not entirely sure what to do about that so not dealing with it yet.

Need to do formatting for `ConstKind::Expr` at some point too since rn it sucks (doesn't even print anything with `Display`) not gonna do that in this PR either.

r? `@compiler-errors`
@Nilstrieb
Copy link
Member

@bors r-

@bors 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 May 16, 2023
@BoxyUwU BoxyUwU force-pushed the ty_const_debug_formatting branch from d983b11 to 2a554eb Compare May 16, 2023 16:16
@BoxyUwU
Copy link
Member Author

BoxyUwU commented May 16, 2023

@bors rollup=never (because apparently changing debug formatting is really hard to get right! 🙄)

@BoxyUwU
Copy link
Member Author

BoxyUwU commented May 16, 2023

@bors r=compiler-errors

@bors
Copy link
Contributor

bors commented May 16, 2023

📌 Commit 2a554eb has been approved by compiler-errors

It is now in the queue for this repository.

@bors 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 May 16, 2023
@bors
Copy link
Contributor

bors commented May 17, 2023

⌛ Testing commit 2a554eb with merge 6c64870...

@bors
Copy link
Contributor

bors commented May 17, 2023

☀️ Test successful - checks-actions
Approved by: compiler-errors
Pushing 6c64870 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 17, 2023
@bors bors merged commit 6c64870 into rust-lang:master May 17, 2023
11 checks passed
@rustbot rustbot added this to the 1.71.0 milestone May 17, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (6c64870): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-3.6% [-3.6%, -3.6%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -3.6% [-3.6%, -3.6%] 1

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.7% [2.7%, 2.7%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 643.756s -> 643.359s (-0.06%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants