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
alexcrichton opened this Issue Nov 18, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@alexcrichton
Copy link
Member

alexcrichton commented Nov 18, 2018

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

This comment has been minimized.

Copy link
Contributor

petrochenkov commented Nov 20, 2018

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

@petrochenkov

This comment has been minimized.

Copy link
Contributor

petrochenkov commented Nov 20, 2018

(Reopening as E-needstest.)

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