Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustc should warn about unused traits. #41883

Closed
ehiggs opened this issue May 10, 2017 · 1 comment
Closed

rustc should warn about unused traits. #41883

ehiggs opened this issue May 10, 2017 · 1 comment
Labels
A-lint Area: Lints (warnings about flaws in source code) such as unused_mut. C-enhancement Category: An issue proposing an enhancement or a PR with one. T-lang Relevant to the language team, which will review and decide on the PR/issue.

Comments

@ehiggs
Copy link

ehiggs commented May 10, 2017

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)

@Mark-Simulacrum Mark-Simulacrum added the A-lint Area: Lints (warnings about flaws in source code) such as unused_mut. label Jun 22, 2017
@Mark-Simulacrum Mark-Simulacrum added the C-enhancement Category: An issue proposing an enhancement or a PR with one. label Jul 27, 2017
marmistrz added a commit to marmistrz/randmockery that referenced this issue Aug 1, 2017
The Rust compiler didn't warn about it: rust-lang/rust#41883
@Enselic Enselic added the T-lang Relevant to the language team, which will review and decide on the PR/issue. label Sep 14, 2023
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Jan 20, 2024
Make traits / trait methods detected by the dead code lint

Fixes rust-lang#118139 and rust-lang#41883
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Jan 20, 2024
Make traits / trait methods detected by the dead code lint

Fixes rust-lang#118139 and rust-lang#41883
bors added a commit to rust-lang-ci/rust that referenced this issue Jan 21, 2024
Make traits / trait methods detected by the dead code lint

Fixes rust-lang#118139 and rust-lang#41883
bors added a commit to rust-lang-ci/rust that referenced this issue Jan 27, 2024
Make traits / trait methods detected by the dead code lint

Fixes rust-lang#118139 and rust-lang#41883
bors added a commit to rust-lang-ci/rust that referenced this issue Jan 28, 2024
Make traits / trait methods detected by the dead code lint

Fixes rust-lang#118139 and rust-lang#41883
bors added a commit to rust-lang-ci/rust that referenced this issue Feb 4, 2024
Make traits / trait methods detected by the dead code lint

Fixes rust-lang#118139 and rust-lang#41883
bors added a commit to rust-lang-ci/rust that referenced this issue Feb 5, 2024
Make traits / trait methods detected by the dead code lint

Fixes rust-lang#118139 and rust-lang#41883
bors added a commit to rust-lang-ci/rust that referenced this issue Feb 7, 2024
Make traits / trait methods detected by the dead code lint

Fixes rust-lang#118139 and rust-lang#41883
@mu001999
Copy link
Contributor

mu001999 commented Feb 7, 2024

@shepmaster This can be closed by #118257

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lint Area: Lints (warnings about flaws in source code) such as unused_mut. C-enhancement Category: An issue proposing an enhancement or a PR with one. T-lang Relevant to the language team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants