Open
Description
First reported upstream this code:
#![warn(rust_2018_idioms)]
#[cfg_attr(test, macro_use)]
extern crate itertools;
use itertools::Itertools;
fn main() {
println!("{:?}", (0..1).collect_vec());
}
when compiled yields:
warning: unused extern crate
--> src/main.rs:4:1
|
4 | extern crate itertools;
| ^^^^^^^^^^^^^^^^^^^^^^^ help: remove it
|
note: lint level defined here
--> src/main.rs:1:9
|
1 | #![warn(rust_2018_idioms)]
| ^^^^^^^^^^^^^^^^
= note: #[warn(unused_extern_crates)] implied by #[warn(rust_2018_idioms)]
but the suggestion is incorrect! Both the extern crate
and the attribute on the item should be removed.
Metadata
Metadata
Assignees
Labels
Area: Messages for errors, warnings, and lintsArea: The 2018 editionArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Suggestions generated by the compiler applied by `cargo fix`Category: An issue proposing an enhancement or a PR with one.Diagnostics: A diagnostic that is giving misleading or incorrect information.Relevant to the compiler team, which will review and decide on the PR/issue.