Skip to content

unused_extern_crates lint should handle aliasing #52451

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

Closed
nrc opened this issue Jul 17, 2018 · 2 comments
Closed

unused_extern_crates lint should handle aliasing #52451

nrc opened this issue Jul 17, 2018 · 2 comments
Assignees
Labels
A-edition-2018 Area: The 2018 edition A-lints Area: Lints (warnings about flaws in source code) such as unused_mut.
Milestone

Comments

@nrc
Copy link
Member

nrc commented Jul 17, 2018

e.g., extern crate rls_span as span;. I'm not sure what the suggestion should be though = pub use ... as ...; to replace the extern crate?

@CryZe
Copy link
Contributor

CryZe commented Jul 17, 2018

Last time I checked pub use doesn't actually reexport crates as reported here: #52140

@alexcrichton
Copy link
Member

Some data points:

This all makes sense with today's implementation which only emits suggestions for 2018 code and doesn't emit machine-applicable suggestions.

Given all that I'm going to close this issue in favor of #52829. I think it's basically just a bug in the compiler today that we're not emitting rustfixable suggestions for removing extern crate annotations. Fixing #52829 will involve taking this issue into account, but otherwise I think that this is an issue currently about a hypothetical buggy implementation that doesn't implement handling renames, but an implementation doesn't even exist today!

@fmease fmease added A-edition-2018 Area: The 2018 edition A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. and removed A-edition-2018-lints labels Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-edition-2018 Area: The 2018 edition A-lints Area: Lints (warnings about flaws in source code) such as unused_mut.
Projects
None yet
Development

No branches or pull requests

4 participants