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]
fn from_atom(atom: &WeakAtom, in_ua: bool) -> Option<Self> {
fn from_atom(atom: &WeakAtom, _in_ua: bool) -> Option<Self> {
macro_rules! pseudo_element {
($pseudo_str_with_colon:expr, $atom:expr, $is_anon_box:expr) => {{
if atom == &*$atom {

View file

@ -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;

View file

@ -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<T> Deref for nsTArray<T> {

View file

@ -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;

View file

@ -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();