Silence some warnings in geckolib

This commit is contained in:
Ravi Shankar 2016-09-27 12:03:55 +05:30
parent 4ceea0426c
commit 24c00da08c
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();