Skip to content
New issue

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

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

Already on GitHub? # to your account

Unused imports lint should detect redundant prelude imports #28296

Closed
jonas-schievink opened this issue Sep 8, 2015 · 3 comments
Closed

Unused imports lint should detect redundant prelude imports #28296

jonas-schievink opened this issue Sep 8, 2015 · 3 comments
Labels
A-lints 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.

Comments

@jonas-schievink
Copy link
Contributor

This code produces no warning:

use std::vec::Vec;

fn main() {
    Vec::<u8>::new();
}

A warning would be useful for old code that imports items which have since made it into the prelude.

@steveklabnik steveklabnik added C-enhancement Category: An issue proposing an enhancement or a PR with one. A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. labels Sep 8, 2015
@steveklabnik
Copy link
Member

Since new lints have a big impact on users of rustc, the policy is that they should go through the RFC process like other user-facing changes. As such, I'm going to give this one a close, but if anyone comes across this ticket and wants this lint, consider adding it to clippy and/or writing up an RFC. Thanks!

@jonas-schievink
Copy link
Contributor Author

This isn't just a bug?

@jonas-schievink
Copy link
Contributor Author

FWIW, I still believe that this is just a regular enhancement of the unused_imports lint that doesn't require an RFC. Just like #33091.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-lints 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.
Projects
None yet
Development

No branches or pull requests

2 participants