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

2018 idioms: rustc-internal crates linted to be removed when they can't #56038

Open
Tracked by #54910
alexcrichton opened this issue Nov 18, 2018 · 2 comments
Open
Tracked by #54910
Labels
A-edition-2018-lints Area: Lints supporting the 2018 edition A-suggestion-diagnostics Area: Suggestions generated by the compiler applied by `cargo fix` E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added.

Comments

@alexcrichton
Copy link
Member

Discovered in rust-lang/cargo#6323

#![feature(extern_crate_item_prelude)]
#![feature(rustc_private)]
#![warn(rust_2018_idioms)]

extern crate syntax;

#[allow(unused_imports)]
use syntax::ast;

fn main() {}

yields:

warning: unused extern crate
 --> src/main.rs:5:1
  |
5 | extern crate syntax;
  | ^^^^^^^^^^^^^^^^^^^^ help: remove it
  |
note: lint level defined here
 --> src/main.rs:3:9
  |
3 | #![warn(rust_2018_idioms)]
  |         ^^^^^^^^^^^^^^^^
  = note: #[warn(unused_extern_crates)] implied by #[warn(rust_2018_idioms)]

This may be fixed by #55884, but it's not clear to me at least

@petrochenkov
Copy link
Contributor

This doesn't reproduce on the current nightly, so apparently it was fixed by #56042.

@petrochenkov petrochenkov added the E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. label Nov 20, 2018
@petrochenkov petrochenkov reopened this Nov 20, 2018
@petrochenkov
Copy link
Contributor

(Reopening as E-needstest.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-edition-2018-lints Area: Lints supporting the 2018 edition A-suggestion-diagnostics Area: Suggestions generated by the compiler applied by `cargo fix` E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
Projects
None yet
Development

No branches or pull requests

2 participants