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

Use a nicer Show impl for Name #15598

Closed
wants to merge 2 commits into from
Closed

Use a nicer Show impl for Name #15598

wants to merge 2 commits into from

Conversation

emberian
Copy link
Member

No description provided.

@@ -62,6 +62,12 @@ impl Show for Ident {
}
}

impl Show for Name {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "\"{}\"", token::get_name(*self).get())
Copy link
Member

Choose a reason for hiding this comment

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

Maybe this could include the number too? (e.g. to help with debugging gensym'd symbols?)

Copy link
Contributor

Choose a reason for hiding this comment

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

That was my comment, too...

@emberian
Copy link
Member Author

Will add.

@emberian
Copy link
Member Author

r? @huonw @brson

@alexcrichton
Copy link
Member

Can you add a test for the pprust change as well? If so, r=me

@emberian
Copy link
Member Author

I'm not sure I can... the pretty tests already test unit structs. I think bindgen is constructing the ast in a peculiar way (it only happens for C structs which contain only unions!).

@alexcrichton
Copy link
Member

There seems to be explicit handling of unit-like structs above where you added the extra clause, and if we don't know why that's not getting triggered, perhaps we could leave it to another PR?

@emberian
Copy link
Member Author

I'll spend a few more minutes debugging rust-bindgen before splitting out that commit

@emberian emberian closed this Jul 11, 2014
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 13, 2023
…eykril

fix: preceding QualifiedPathType for into_to_from assist

fixes rust-lang#15598
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants