Skip to content

2018 lints: false positive: "extern crate is not idiomatic" #52479

Closed
@matthiaskrgr

Description

@matthiaskrgr
git clone http://github.com/matthiaskrgr/cargo-rebuild-check
cd cargo-rebuild-check/
git checkout origin/rust_2018
cargo test

=>

   Compiling cargo-rebuild-check v0.1.0 (file:///tmp/cargo-rebuild-check)
warning: `extern crate` is not idiomatic in the new edition========> ] 134/135: cargo-rebuild-check
  |
note: lint level defined here
 --> src/main.rs:11:5
  |
11|     unused
  |     ^^^^^^
  = note: #[warn(unused_extern_crates)] implied by #[warn(unused)]
    Finished dev [unoptimized + debuginfo] target(s) in 1m 24s
     Running target/debug/deps/cargo_rebuild_check-49c258c37ade7bcc

I'm not sure what rustc is complaining about.
There simply is no "extern crate" inside the project at this point :/
It also fails to point me to the code location which is suspicious.

rustc 1.29.0-nightly (4f3c7a4 2018-07-17)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-edition-2018Area: The 2018 editionA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions