Skip to content

#[derive(Debug)] is triggering the unused_results lint #29710

Closed
@canndrew

Description

@canndrew

The following code fails to build on nightly

#![deny(unused_results)]

#[derive(Debug)]
enum Foo {
    Bar(u32),
}

It generates this error:

<anon>:3:10: 3:15 error: unused result
<anon>:3 #[derive(Debug)]
                  ^~~~~
<anon>:3:10: 3:15 note: in this expansion of #[derive_Debug] (defined in <anon>)
<anon>:1:9: 1:23 note: lint level defined here
<anon>:1 #![deny(unused_results)]

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-syntaxextArea: Syntax extensions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions