mirror of
https://github.com/rust-lang/rust.git
synced 2025-09-28 21:55:31 +00:00

PR 138515, we insert a placeholder attribute so that checks for attributes can still know about the placement of `cfg` attributes. When we suggest removing items with `cfg_attr`s (fix Issue 56328) and make them verbose. We tweak the wording of the existing "unused `extern crate`" lint. ``` warning: unused extern crate --> $DIR/removing-extern-crate.rs:9:1 | LL | extern crate removing_extern_crate as foo; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unused | note: the lint level is defined here --> $DIR/removing-extern-crate.rs:6:9 | LL | #![warn(rust_2018_idioms)] | ^^^^^^^^^^^^^^^^ = note: `#[warn(unused_extern_crates)]` implied by `#[warn(rust_2018_idioms)]` help: remove the unused `extern crate` | LL - #[cfg_attr(test, macro_use)] LL - extern crate removing_extern_crate as foo; LL + | ```
21 lines
580 B
Plaintext
21 lines
580 B
Plaintext
error: unused extern crate
|
|
--> $DIR/issue-54400-unused-extern-crate-attr-span.rs:12:1
|
|
|
|
|
LL | extern crate edition_lint_paths;
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unused
|
|
|
|
|
note: the lint level is defined here
|
|
--> $DIR/issue-54400-unused-extern-crate-attr-span.rs:6:9
|
|
|
|
|
LL | #![deny(rust_2018_idioms)]
|
|
| ^^^^^^^^^^^^^^^^
|
|
= note: `#[deny(unused_extern_crates)]` implied by `#[deny(rust_2018_idioms)]`
|
|
help: remove the unused `extern crate`
|
|
|
|
|
LL - #[cfg(not(FALSE))]
|
|
LL - extern crate edition_lint_paths;
|
|
|
|
|
|
|
error: aborting due to 1 previous error
|
|
|