Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//@ edition:2018
//@ aux-build:../removing-extern-crate.rs
//@ aux-build: remove-extern-crate.rs
//@ run-rustfix

#![warn(rust_2018_idioms)]
Expand Down
6 changes: 3 additions & 3 deletions tests/ui/rust-2018/removing-extern-crate-malformed-cfg.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
//@ edition:2018
//@ aux-build:../removing-extern-crate.rs
//@ aux-build: remove-extern-crate.rs
//@ run-rustfix

#![warn(rust_2018_idioms)]

#[cfg_attr(test, "macro_use")] //~ ERROR expected
extern crate removing_extern_crate as foo; //~ WARNING unused extern crate
extern crate remove_extern_crate as foo; //~ WARNING unused extern crate
extern crate core; //~ WARNING unused extern crate

mod another {
#[cfg_attr(test)] //~ ERROR expected
extern crate removing_extern_crate as foo; //~ WARNING unused extern crate
extern crate remove_extern_crate as foo; //~ WARNING unused extern crate
extern crate core; //~ WARNING unused extern crate
}

Expand Down
12 changes: 6 additions & 6 deletions tests/ui/rust-2018/removing-extern-crate-malformed-cfg.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ LL | #[cfg_attr(test)]
warning: unused extern crate
--> $DIR/removing-extern-crate-malformed-cfg.rs:8:1
|
LL | extern crate removing_extern_crate as foo;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unused
LL | extern crate remove_extern_crate as foo;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unused
|
note: the lint level is defined here
--> $DIR/removing-extern-crate-malformed-cfg.rs:5:9
Expand All @@ -31,7 +31,7 @@ LL | #![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 - extern crate remove_extern_crate as foo;
LL +
|

Expand All @@ -50,13 +50,13 @@ LL +
warning: unused extern crate
--> $DIR/removing-extern-crate-malformed-cfg.rs:13:5
|
LL | extern crate removing_extern_crate as foo;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unused
LL | extern crate remove_extern_crate as foo;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unused
|
help: remove the unused `extern crate`
|
LL - #[cfg_attr(test)]
LL - extern crate removing_extern_crate as foo;
LL - extern crate remove_extern_crate as foo;
LL +
|

Expand Down
Loading