Auto merge of #13456 - Wafflespeanut:warnings, r=emilio

Silence some warnings in geckolib

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors

<!-- Either: -->
- [x] These changes do not require tests because it's a cleanup

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

We'll be silencing thousands of warnings this way, which would probably help with Travis.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13456)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-09-29 22:46:38 -05:00 committed by GitHub
commit 37c8892b87
6 changed files with 14 additions and 9 deletions

View file

@ -61,7 +61,7 @@ impl PseudoElement {
} }
#[inline] #[inline]
fn from_atom(atom: &WeakAtom, in_ua: bool) -> Option<Self> { fn from_atom(atom: &WeakAtom, _in_ua: bool) -> Option<Self> {
macro_rules! pseudo_element { macro_rules! pseudo_element {
($pseudo_str_with_colon:expr, $atom:expr, $is_anon_box:expr) => {{ ($pseudo_str_with_colon:expr, $atom:expr, $is_anon_box:expr) => {{
if atom == &*$atom { if atom == &*$atom {

View file

@ -2,17 +2,24 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * 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 bindings;
pub mod ptr; 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)] #[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 { pub mod structs {
include!("structs_debug.rs"); include!("structs_debug.rs");
} }
#[cfg(not(debug_assertions))] #[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 { pub mod structs {
include!("structs_release.rs"); include!("structs_release.rs");
} }
pub mod sugar; pub mod sugar;

View file

@ -6,7 +6,6 @@ use gecko_bindings::bindings;
use gecko_bindings::structs::{nsTArray, nsTArrayHeader}; use gecko_bindings::structs::{nsTArray, nsTArrayHeader};
use std::mem; use std::mem;
use std::ops::{Deref, DerefMut}; use std::ops::{Deref, DerefMut};
use std::os::raw::c_void;
use std::slice; use std::slice;
impl<T> Deref for nsTArray<T> { impl<T> Deref for nsTArray<T> {

View file

@ -22,7 +22,7 @@ use std::ops::Deref;
use std::slice; use std::slice;
#[macro_use] #[macro_use]
#[allow(improper_ctypes, safe_extern_statics)] #[allow(improper_ctypes, non_camel_case_types)]
pub mod atom_macro; pub mod atom_macro;
#[macro_use] #[macro_use]
pub mod namespace; pub mod namespace;

View file

@ -1118,7 +1118,6 @@ fn static_assert() {
use gecko_bindings::structs::nsStyleImageLayers_Size_DimensionType; use gecko_bindings::structs::nsStyleImageLayers_Size_DimensionType;
use gecko_bindings::structs::{nsStyleCoord_CalcValue, nsStyleImageLayers_Size}; use gecko_bindings::structs::{nsStyleCoord_CalcValue, nsStyleImageLayers_Size};
use properties::longhands::background_size::single_value::computed_value::T; use properties::longhands::background_size::single_value::computed_value::T;
use values::computed::LengthOrPercentageOrAuto;
let mut width = nsStyleCoord_CalcValue::new(); let mut width = nsStyleCoord_CalcValue::new();
let mut height = nsStyleCoord_CalcValue::new(); let mut height = nsStyleCoord_CalcValue::new();

View file

@ -21,16 +21,16 @@ use style::gecko::data::{NUM_THREADS, PerDocumentStyleData};
use style::gecko::selector_impl::{GeckoSelectorImpl, PseudoElement}; use style::gecko::selector_impl::{GeckoSelectorImpl, PseudoElement};
use style::gecko::snapshot::GeckoElementSnapshot; use style::gecko::snapshot::GeckoElementSnapshot;
use style::gecko::traversal::RecalcStyleOnly; 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::wrapper::{GeckoElement, GeckoNode};
use style::gecko_bindings::bindings::{RawGeckoElementBorrowed, RawGeckoNodeBorrowed}; use style::gecko_bindings::bindings::{RawGeckoElementBorrowed, RawGeckoNodeBorrowed};
use style::gecko_bindings::bindings::{RawServoStyleSetBorrowed, RawServoStyleSetOwned}; 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::{RawServoStyleSheetBorrowed, ServoComputedValuesBorrowed};
use style::gecko_bindings::bindings::{RawServoStyleSheetStrong, ServoComputedValuesStrong}; use style::gecko_bindings::bindings::{RawServoStyleSheetStrong, ServoComputedValuesStrong};
use style::gecko_bindings::bindings::{ServoDeclarationBlockBorrowed, ServoDeclarationBlockStrong}; use style::gecko_bindings::bindings::{ServoDeclarationBlockBorrowed, ServoDeclarationBlockStrong};
use style::gecko_bindings::bindings::{ThreadSafePrincipalHolder, ThreadSafeURIHolder}; use style::gecko_bindings::bindings::{ThreadSafePrincipalHolder, ThreadSafeURIHolder};
use style::gecko_bindings::bindings::{nsHTMLCSSStyleSheet, ServoComputedValuesBorrowedOrNull}; use style::gecko_bindings::bindings::{nsHTMLCSSStyleSheet, ServoComputedValuesBorrowedOrNull};
use style::gecko_bindings::bindings::RawServoStyleSetBorrowedMut;
use style::gecko_bindings::ptr::{GeckoArcPrincipal, GeckoArcURI}; use style::gecko_bindings::ptr::{GeckoArcPrincipal, GeckoArcURI};
use style::gecko_bindings::structs::{SheetParsingMode, nsIAtom}; use style::gecko_bindings::structs::{SheetParsingMode, nsIAtom};
use style::gecko_bindings::structs::ServoElementSnapshot; use style::gecko_bindings::structs::ServoElementSnapshot;