diff options
Diffstat (limited to 'tests/ui/removing-extern-crate.rs')
-rw-r--r-- | tests/ui/removing-extern-crate.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/removing-extern-crate.rs b/tests/ui/removing-extern-crate.rs new file mode 100644 index 000000000..465e1360c --- /dev/null +++ b/tests/ui/removing-extern-crate.rs @@ -0,0 +1,16 @@ +// edition:2018 +// aux-build:removing-extern-crate.rs +// run-rustfix +// check-pass + +#![warn(rust_2018_idioms)] + +extern crate removing_extern_crate as foo; //~ WARNING unused extern crate +extern crate core; //~ WARNING unused extern crate + +mod another { + extern crate removing_extern_crate as foo; //~ WARNING unused extern crate + extern crate core; //~ WARNING unused extern crate +} + +fn main() {} |