Skip to content

Cannot derive Debug for struct named builder #42453

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

Closed
alanhdu opened this issue Jun 5, 2017 · 2 comments
Closed

Cannot derive Debug for struct named builder #42453

alanhdu opened this issue Jun 5, 2017 · 2 comments
Labels
C-bug Category: This is a bug.

Comments

@alanhdu
Copy link
Contributor

alanhdu commented Jun 5, 2017

If I try to compile:

#[derive(Debug)]
struct builder;

I get a very cryptic error message:

error[E0530]: let bindings cannot shadow unit structs

error: aborting due to previous error

This is with both Rust 1.17 and the current nightly.

Playpen link.

(Originally discovered via diesel-rs/diesel#934)

@nagisa nagisa added the I-wrong label Jun 5, 2017
@nagisa
Copy link
Member

nagisa commented Jun 5, 2017

This seems like a general hygiene issue, but am not sure if the built-in derives are using the new procedural macros. If they aren’t, porting may suffice. If they are, there’s a bug in our procedural macros.

cc @jseyfried?

@Mark-Simulacrum Mark-Simulacrum added C-bug Category: This is a bug. and removed I-wrong labels Jul 27, 2017
@alanhdu
Copy link
Contributor Author

alanhdu commented Mar 13, 2018

Closed by #48934

@alanhdu alanhdu closed this as completed Mar 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug.
Projects
None yet
Development

No branches or pull requests

3 participants