diff options
| author | Jeffrey Seyfried <jeffrey.seyfried@gmail.com> | 2017-01-14 07:35:54 +0000 |
|---|---|---|
| committer | Jeffrey Seyfried <jeffrey.seyfried@gmail.com> | 2017-01-21 07:40:19 +0000 |
| commit | 2efec3c18050b4093ed8be9537145bdc2a50f7e7 (patch) | |
| tree | ec09fa9e43fe371a689c892f2e374b7611a301f7 /src/test | |
| parent | 633f38ae99b657f70e2aba135318178abc9fee16 (diff) | |
| download | rust-2efec3c18050b4093ed8be9537145bdc2a50f7e7.tar.gz rust-2efec3c18050b4093ed8be9537145bdc2a50f7e7.zip | |
Improve `unused_extern_crate` warnings.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/compile-fail/lint-unused-extern-crate.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/test/compile-fail/lint-unused-extern-crate.rs b/src/test/compile-fail/lint-unused-extern-crate.rs index 52cb84f662d..515e3b833d9 100644 --- a/src/test/compile-fail/lint-unused-extern-crate.rs +++ b/src/test/compile-fail/lint-unused-extern-crate.rs @@ -33,6 +33,11 @@ use rand::isaac::IsaacRng; use other::*; +mod foo { + // Test that this is unused even though an earler `extern crate rand` is used. + extern crate rand; //~ ERROR unused extern crate +} + fn main() { let x: collecs::vec::Vec<usize> = Vec::new(); let y = foo(); |
