From b021874ba08f1d207e70ddaf32b374c9533e29f0 Mon Sep 17 00:00:00 2001 From: Zbynek Winkler Date: Wed, 20 Apr 2016 09:25:50 +0200 Subject: [PATCH] Silence unused-extern-crates false positives. Added #[allow(unused_extern_crates)] to silence false positives * bitflags, lazy_static and matches because macro_use * alloc_jemalloc because builtin crate See https://github.com/rust-lang/rust/issues/30849 --- components/devtools_traits/lib.rs | 1 + components/gfx/lib.rs | 2 ++ components/layout/lib.rs | 1 + components/msg/lib.rs | 1 + components/net_traits/lib.rs | 1 + components/profile/lib.rs | 1 + components/script/lib.rs | 1 + components/style/lib.rs | 3 +++ components/util/lib.rs | 2 ++ ports/glutin/lib.rs | 1 + 10 files changed, 14 insertions(+) diff --git a/components/devtools_traits/lib.rs b/components/devtools_traits/lib.rs index f084d70d638..f8498092442 100644 --- a/components/devtools_traits/lib.rs +++ b/components/devtools_traits/lib.rs @@ -15,6 +15,7 @@ #![feature(custom_derive, plugin)] #![plugin(heapsize_plugin, serde_macros)] +#[allow(unused_extern_crates)] #[macro_use] extern crate bitflags; extern crate heapsize; diff --git a/components/gfx/lib.rs b/components/gfx/lib.rs index f60575cd625..1eecec8e321 100644 --- a/components/gfx/lib.rs +++ b/components/gfx/lib.rs @@ -23,6 +23,7 @@ extern crate alloc; extern crate app_units; extern crate azure; +#[allow(unused_extern_crates)] #[macro_use] extern crate bitflags; @@ -49,6 +50,7 @@ extern crate harfbuzz_sys as harfbuzz; extern crate heapsize; extern crate ipc_channel; extern crate layers; +#[allow(unused_extern_crates)] #[macro_use] extern crate lazy_static; extern crate libc; diff --git a/components/layout/lib.rs b/components/layout/lib.rs index 4f1d9abdac1..558e4a1492d 100644 --- a/components/layout/lib.rs +++ b/components/layout/lib.rs @@ -21,6 +21,7 @@ extern crate app_units; extern crate azure; +#[allow(unused_extern_crates)] #[macro_use] extern crate bitflags; extern crate canvas_traits; diff --git a/components/msg/lib.rs b/components/msg/lib.rs index 0f2a16228a1..bd97c3a33da 100644 --- a/components/msg/lib.rs +++ b/components/msg/lib.rs @@ -7,6 +7,7 @@ #![deny(unsafe_code)] +#[allow(unused_extern_crates)] #[macro_use] extern crate bitflags; extern crate euclid; diff --git a/components/net_traits/lib.rs b/components/net_traits/lib.rs index 819d0a80335..03e372393de 100644 --- a/components/net_traits/lib.rs +++ b/components/net_traits/lib.rs @@ -17,6 +17,7 @@ extern crate heapsize; extern crate hyper; extern crate image as piston_image; extern crate ipc_channel; +#[allow(unused_extern_crates)] #[macro_use] extern crate lazy_static; #[macro_use] diff --git a/components/profile/lib.rs b/components/profile/lib.rs index 53b7fa0ae2b..5885d85588d 100644 --- a/components/profile/lib.rs +++ b/components/profile/lib.rs @@ -10,6 +10,7 @@ #![deny(unsafe_code)] +#[allow(unused_extern_crates)] #[cfg(not(target_os = "windows"))] extern crate alloc_jemalloc; extern crate hbs_pow; diff --git a/components/script/lib.rs b/components/script/lib.rs index e525a62b70d..deb1e8ba9e5 100644 --- a/components/script/lib.rs +++ b/components/script/lib.rs @@ -30,6 +30,7 @@ extern crate angle; extern crate app_units; +#[allow(unused_extern_crates)] #[macro_use] extern crate bitflags; extern crate canvas; diff --git a/components/style/lib.rs b/components/style/lib.rs index 951a32cd3ce..8473572626a 100644 --- a/components/style/lib.rs +++ b/components/style/lib.rs @@ -19,6 +19,7 @@ #![recursion_limit = "500"] // For match_ignore_ascii_case in PropertyDeclaration::parse extern crate app_units; +#[allow(unused_extern_crates)] #[macro_use] extern crate bitflags; extern crate core; @@ -28,10 +29,12 @@ extern crate encoding; extern crate euclid; extern crate fnv; extern crate heapsize; +#[allow(unused_extern_crates)] #[macro_use] extern crate lazy_static; #[macro_use] extern crate log; +#[allow(unused_extern_crates)] #[macro_use] extern crate matches; extern crate num; diff --git a/components/util/lib.rs b/components/util/lib.rs index 5eb530f1b19..b4998b0580c 100644 --- a/components/util/lib.rs +++ b/components/util/lib.rs @@ -18,6 +18,7 @@ #![deny(unsafe_code)] extern crate app_units; +#[allow(unused_extern_crates)] #[macro_use] extern crate bitflags; extern crate deque; @@ -27,6 +28,7 @@ extern crate heapsize; extern crate ipc_channel; #[cfg(feature = "non-geckolib")] extern crate js; +#[allow(unused_extern_crates)] #[macro_use] extern crate lazy_static; extern crate libc; diff --git a/ports/glutin/lib.rs b/ports/glutin/lib.rs index d8c6a41ce5b..367ae7bc71b 100644 --- a/ports/glutin/lib.rs +++ b/ports/glutin/lib.rs @@ -9,6 +9,7 @@ #[macro_use] extern crate bitflags; #[cfg(target_os = "macos")] extern crate cgl; extern crate compositing; +#[allow(unused_extern_crates)] #[cfg(target_os = "android")] extern crate egl; extern crate euclid; extern crate gleam;