Bug 1646811 - Remove some unused extern crate declarations now that style is in rust 2018.
authorEmilio Cobos Álvarez <emilio@crisal.io>
Thu, 18 Jun 2020 18:14:24 +0000
changeset 536377 a3dfa01e1721a81bcf5a4dfd6fa67c0b16809afb
parent 536376 0c86a4e35a8e5f98df5dee0f1fdb5b6df2d3640e
child 536378 206011a5cc20c369785442fb03a8d377125e4675
push id119420
push userealvarez@mozilla.com
push dateThu, 18 Jun 2020 18:18:12 +0000
treeherderautoland@206011a5cc20 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1646811
milestone79.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1646811 - Remove some unused extern crate declarations now that style is in rust 2018. This avoids some warnings. Depends on D80247 Differential Revision: https://phabricator.services.mozilla.com/D80248
servo/components/style/build.rs
servo/components/style/encoding_support.rs
servo/components/style/lib.rs
--- a/servo/components/style/build.rs
+++ b/servo/components/style/build.rs
@@ -1,23 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
 
 #[macro_use]
 extern crate lazy_static;
-#[cfg(feature = "gecko")]
-extern crate bindgen;
-#[cfg(feature = "gecko")]
-extern crate log;
-#[cfg(feature = "gecko")]
-extern crate regex;
-#[cfg(feature = "gecko")]
-extern crate toml;
-extern crate walkdir;
 
 use std::env;
 use std::path::Path;
 use std::process::{exit, Command};
 use walkdir::WalkDir;
 
 #[cfg(feature = "gecko")]
 mod build_gecko;
--- a/servo/components/style/encoding_support.rs
+++ b/servo/components/style/encoding_support.rs
@@ -1,16 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
 
 //! Parsing stylesheets from bytes (not `&str`).
 
-extern crate encoding_rs;
-
 use crate::context::QuirksMode;
 use crate::error_reporting::ParseErrorReporter;
 use crate::media_queries::MediaList;
 use crate::shared_lock::SharedRwLock;
 use crate::stylesheets::{AllowImportRules, Origin, Stylesheet, StylesheetLoader, UrlExtraData};
 use cssparser::{stylesheet_encoding, EncodingSupport};
 use servo_arc::Arc;
 use std::borrow::Cow;
--- a/servo/components/style/lib.rs
+++ b/servo/components/style/lib.rs
@@ -20,96 +20,57 @@
 //! Major dependencies are the [cssparser][cssparser] and [selectors][selectors]
 //! crates.
 //!
 //! [cssparser]: ../cssparser/index.html
 //! [selectors]: ../selectors/index.html
 
 #![deny(missing_docs)]
 
-extern crate app_units;
-extern crate arrayvec;
-extern crate atomic_refcell;
 #[macro_use]
 extern crate bitflags;
-#[allow(unused_extern_crates)]
-extern crate byteorder;
 #[macro_use]
 extern crate cssparser;
 #[macro_use]
 extern crate debug_unreachable;
 #[macro_use]
 extern crate derive_more;
-extern crate euclid;
-extern crate fallible;
-extern crate fxhash;
 #[cfg(feature = "gecko")]
 #[macro_use]
 pub mod gecko_string_cache;
-extern crate hashglobe;
 #[cfg(feature = "servo")]
 #[macro_use]
 extern crate html5ever;
-extern crate indexmap;
-extern crate itertools;
-extern crate itoa;
 #[macro_use]
 extern crate lazy_static;
 #[macro_use]
 extern crate log;
 #[macro_use]
 extern crate malloc_size_of;
 #[macro_use]
 extern crate malloc_size_of_derive;
 #[allow(unused_extern_crates)]
 #[macro_use]
 extern crate matches;
 #[cfg(feature = "gecko")]
-pub extern crate nsstring;
+pub use nsstring;
 #[cfg(feature = "gecko")]
 extern crate num_cpus;
 #[macro_use]
 extern crate num_derive;
-extern crate num_integer;
-extern crate num_traits;
-extern crate owning_ref;
-extern crate parking_lot;
-extern crate precomputed_hash;
-extern crate rayon;
-extern crate selectors;
 #[macro_use]
 extern crate serde;
-pub extern crate servo_arc;
+pub use servo_arc;
 #[cfg(feature = "servo")]
 #[macro_use]
 extern crate servo_atoms;
-#[cfg(feature = "servo")]
-extern crate servo_config;
-#[cfg(feature = "servo")]
-extern crate servo_url;
-extern crate smallbitvec;
-extern crate smallvec;
-#[cfg(feature = "gecko")]
-extern crate static_prefs;
-#[cfg(feature = "servo")]
-extern crate string_cache;
 #[macro_use]
 extern crate style_derive;
-extern crate style_traits;
-#[cfg(feature = "gecko")]
-extern crate thin_slice;
-extern crate time;
-extern crate to_shmem;
 #[macro_use]
 extern crate to_shmem_derive;
-extern crate uluru;
-extern crate unicode_bidi;
-#[allow(unused_extern_crates)]
-extern crate unicode_segmentation;
-extern crate void;
 
 #[macro_use]
 mod macros;
 
 pub mod animation;
 pub mod applicable_declarations;
 #[allow(missing_docs)] // TODO.
 #[cfg(feature = "servo")]