Skip to content

rustc should warn about unused traits. #41883

Closed
@ehiggs

Description

@ehiggs
trait A{}

fn main() {}

This won't yield a compiler warning. However the equivalent with a struct will:

struct A{}

fn main() {}

https://play.rust-lang.org/?gist=0787e43a11bb28969e9f4978954c3fdc

rustc 1.19.0-nightly (d3abc80 2017-05-09)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.C-enhancementCategory: An issue proposing an enhancement or a PR with one.T-langRelevant to the language team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions