Skip to content

Cannot derive Debug for struct named builder #42453

Closed
@alanhdu

Description

@alanhdu

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions