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

Make Debug impl for Term useful #101587

Merged
merged 1 commit into from
Sep 9, 2022
Merged

Make Debug impl for Term useful #101587

merged 1 commit into from
Sep 9, 2022

Conversation

BoxyUwU
Copy link
Member

@BoxyUwU BoxyUwU commented Sep 8, 2022

because Term { ptr: 78942378998734298342, maker: PhantomData, } does not excel at communicating the necessary information

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Sep 8, 2022
@rust-highfive
Copy link
Collaborator

r? @cjgillot

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 8, 2022
@compiler-errors
Copy link
Member

r=me when ci is green, since i am out at lunch

@BoxyUwU
Copy link
Member Author

BoxyUwU commented Sep 8, 2022

@bors r= compiler-errors

@bors
Copy link
Contributor

bors commented Sep 8, 2022

📌 Commit ef36af2 has been approved by ``

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 Sep 8, 2022
@compiler-errors
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 Sep 8, 2022
@compiler-errors
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Sep 8, 2022

📌 Commit ef36af2 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 Sep 8, 2022
pub struct Term<'tcx> {
ptr: NonZeroUsize,
marker: PhantomData<(Ty<'tcx>, Const<'tcx>)>,
}

impl Debug for Term<'_> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let data = if let Some(ty) = self.ty() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a nit but shouldn't this just match on self.unpack()

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

xd I didn't know that method existed

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this just print unpack()?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 8, 2022
…mpiler-errors

Rollup of 7 pull requests

Successful merges:

 - rust-lang#101423 (Fix hermit warnings)
 - rust-lang#101499 (Introduce lowering_arena to avoid creating AST nodes on the fly)
 - rust-lang#101530 (llvm-wrapper: adapt for LLVM API changes)
 - rust-lang#101554 (rustdoc: remove unused CSS `#implementations-list > h3 > span.in-band`)
 - rust-lang#101580 (rustdoc: remove unused CSS `div.impl-items > div`)
 - rust-lang#101584 (rustdoc: remove no-op CSS `#settings-menu { padding: 0 }`)
 - rust-lang#101587 (Make `Debug` impl for `Term` useful)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit e43cf3d into rust-lang:master Sep 9, 2022
@rustbot rustbot added this to the 1.65.0 milestone Sep 9, 2022
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants