-
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
Use a nicer Show impl for Name #15598
Conversation
@@ -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()) |
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.
Maybe this could include the number too? (e.g. to help with debugging gensym
'd symbols?)
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.
That was my comment, too...
Will add. |
fix for rust-bindgen
Can you add a test for the |
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!). |
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? |
I'll spend a few more minutes debugging rust-bindgen before splitting out that commit |
…eykril fix: preceding QualifiedPathType for into_to_from assist fixes rust-lang#15598
No description provided.