diff --git a/components/style/gecko/selector_impl.rs b/components/style/gecko/selector_impl.rs index e1dbffbdc19..bcd3a48158d 100644 --- a/components/style/gecko/selector_impl.rs +++ b/components/style/gecko/selector_impl.rs @@ -61,7 +61,7 @@ impl PseudoElement { } #[inline] - fn from_atom(atom: &WeakAtom, in_ua: bool) -> Option { + fn from_atom(atom: &WeakAtom, _in_ua: bool) -> Option { macro_rules! pseudo_element { ($pseudo_str_with_colon:expr, $atom:expr, $is_anon_box:expr) => {{ if atom == &*$atom { diff --git a/components/style/gecko_bindings/mod.rs b/components/style/gecko_bindings/mod.rs index 38811ed321c..877af7b6ca9 100644 --- a/components/style/gecko_bindings/mod.rs +++ b/components/style/gecko_bindings/mod.rs @@ -2,17 +2,24 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#[allow(dead_code, non_camel_case_types)] +#[allow(dead_code, improper_ctypes, non_camel_case_types)] pub mod bindings; pub mod ptr; + +// FIXME: We allow `improper_ctypes` (for now), because the lint doesn't allow +// foreign structs to have `PhantomData`. We should remove this once the lint +// ignores this case. + #[cfg(debug_assertions)] -#[allow(dead_code, non_camel_case_types, non_snake_case, non_upper_case_globals)] +#[allow(dead_code, improper_ctypes, non_camel_case_types, non_snake_case, non_upper_case_globals)] pub mod structs { include!("structs_debug.rs"); } + #[cfg(not(debug_assertions))] -#[allow(dead_code, non_camel_case_types, non_snake_case, non_upper_case_globals)] +#[allow(dead_code, improper_ctypes, non_camel_case_types, non_snake_case, non_upper_case_globals)] pub mod structs { include!("structs_release.rs"); } + pub mod sugar; diff --git a/components/style/gecko_bindings/sugar/ns_t_array.rs b/components/style/gecko_bindings/sugar/ns_t_array.rs index 901638d1b1f..c7b824a11dc 100644 --- a/components/style/gecko_bindings/sugar/ns_t_array.rs +++ b/components/style/gecko_bindings/sugar/ns_t_array.rs @@ -6,7 +6,6 @@ use gecko_bindings::bindings; use gecko_bindings::structs::{nsTArray, nsTArrayHeader}; use std::mem; use std::ops::{Deref, DerefMut}; -use std::os::raw::c_void; use std::slice; impl Deref for nsTArray { diff --git a/components/style/gecko_string_cache/mod.rs b/components/style/gecko_string_cache/mod.rs index 0bcd58f9bc6..baecd440a0f 100644 --- a/components/style/gecko_string_cache/mod.rs +++ b/components/style/gecko_string_cache/mod.rs @@ -22,7 +22,7 @@ use std::ops::Deref; use std::slice; #[macro_use] -#[allow(improper_ctypes, safe_extern_statics)] +#[allow(improper_ctypes, non_camel_case_types)] pub mod atom_macro; #[macro_use] pub mod namespace; diff --git a/components/style/properties/gecko.mako.rs b/components/style/properties/gecko.mako.rs index f4a507dfb7a..12ea3bc1cf6 100644 --- a/components/style/properties/gecko.mako.rs +++ b/components/style/properties/gecko.mako.rs @@ -1118,7 +1118,6 @@ fn static_assert() { use gecko_bindings::structs::nsStyleImageLayers_Size_DimensionType; use gecko_bindings::structs::{nsStyleCoord_CalcValue, nsStyleImageLayers_Size}; use properties::longhands::background_size::single_value::computed_value::T; - use values::computed::LengthOrPercentageOrAuto; let mut width = nsStyleCoord_CalcValue::new(); let mut height = nsStyleCoord_CalcValue::new(); diff --git a/ports/geckolib/glue.rs b/ports/geckolib/glue.rs index e2304c88ab6..752ce7b61e7 100644 --- a/ports/geckolib/glue.rs +++ b/ports/geckolib/glue.rs @@ -21,16 +21,16 @@ use style::gecko::data::{NUM_THREADS, PerDocumentStyleData}; use style::gecko::selector_impl::{GeckoSelectorImpl, PseudoElement}; use style::gecko::snapshot::GeckoElementSnapshot; use style::gecko::traversal::RecalcStyleOnly; -use style::gecko::wrapper::{DUMMY_BASE_URL, GeckoDeclarationBlock, GeckoDocument}; +use style::gecko::wrapper::{DUMMY_BASE_URL, GeckoDeclarationBlock}; use style::gecko::wrapper::{GeckoElement, GeckoNode}; use style::gecko_bindings::bindings::{RawGeckoElementBorrowed, RawGeckoNodeBorrowed}; use style::gecko_bindings::bindings::{RawServoStyleSetBorrowed, RawServoStyleSetOwned}; -use style::gecko_bindings::bindings::{RawServoStyleSetBorrowedMut, RawGeckoDocumentBorrowed}; use style::gecko_bindings::bindings::{RawServoStyleSheetBorrowed, ServoComputedValuesBorrowed}; use style::gecko_bindings::bindings::{RawServoStyleSheetStrong, ServoComputedValuesStrong}; use style::gecko_bindings::bindings::{ServoDeclarationBlockBorrowed, ServoDeclarationBlockStrong}; use style::gecko_bindings::bindings::{ThreadSafePrincipalHolder, ThreadSafeURIHolder}; use style::gecko_bindings::bindings::{nsHTMLCSSStyleSheet, ServoComputedValuesBorrowedOrNull}; +use style::gecko_bindings::bindings::RawServoStyleSetBorrowedMut; use style::gecko_bindings::ptr::{GeckoArcPrincipal, GeckoArcURI}; use style::gecko_bindings::structs::{SheetParsingMode, nsIAtom}; use style::gecko_bindings::structs::ServoElementSnapshot;