Skip to content

Error message for failed derive of Debug references core::fmt::Show #22478

Closed
@swgillespie

Description

@swgillespie

Code snippet:

pub struct NotDebug(u32);

#[derive(Debug)]
pub struct XYZ {
    thing: u32,
    other_thing: NotDebug
}

fn main() {

}

output:

<anon>:6:5: 6:26 error: the trait `core::fmt::Show` is not implemented for the type `NotDebug` [E0277]
<anon>:6     other_thing: NotDebug
             ^~~~~~~~~~~~~~~~~~~~~
note: in expansion of #[derive]
<anon>:3:1: 3:17 note: expansion site
error: aborting due to previous error

I would think that it should at least reference core::fmt::Debug instead. I'd tackle this myself but I'm afraid I don't know where to start looking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsA-syntaxextArea: Syntax extensions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions