Skip to content

rustc should warn about unused traits. #41883

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions