Skip to content

#[must_use] on traits also affects trait objects #796

Closed
@alercah

Description

@alercah

The reference says:

When used on a trait declaration, a call expression of an expression statement to a function that returns an impl trait of that trait violates the unused_must_use lint.

But it also applies to dyn Trait, not just impl Trait.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-attributesArea: AttributesEasyWe believe this would not be difficult to actually fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions