mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Fix some warnings
This commit is contained in:
parent
e94d8d5bc1
commit
fae2da0f59
4 changed files with 2 additions and 30 deletions
|
@ -11,7 +11,7 @@ use servo_config::prefs::{PREFS, PrefValue};
|
||||||
use servo_url::ServoUrl;
|
use servo_url::ServoUrl;
|
||||||
use style::context::QuirksMode;
|
use style::context::QuirksMode;
|
||||||
use style::media_queries::{Device, MediaList, MediaType};
|
use style::media_queries::{Device, MediaList, MediaType};
|
||||||
use style::parser::{Parse, ParserContext, ParserErrorContext};
|
use style::parser::{ParserContext, ParserErrorContext};
|
||||||
use style::shared_lock::SharedRwLock;
|
use style::shared_lock::SharedRwLock;
|
||||||
use style::stylesheets::{CssRuleType, Stylesheet, StylesheetInDocument, Origin};
|
use style::stylesheets::{CssRuleType, Stylesheet, StylesheetInDocument, Origin};
|
||||||
use style::stylesheets::viewport_rule::*;
|
use style::stylesheets::viewport_rule::*;
|
||||||
|
|
|
@ -12,7 +12,6 @@ extern crate selectors;
|
||||||
#[macro_use] extern crate style;
|
#[macro_use] extern crate style;
|
||||||
extern crate style_traits;
|
extern crate style_traits;
|
||||||
|
|
||||||
mod sanity_checks;
|
|
||||||
#[cfg(target_pointer_width = "64")]
|
#[cfg(target_pointer_width = "64")]
|
||||||
mod size_of;
|
mod size_of;
|
||||||
mod specified_values;
|
mod specified_values;
|
||||||
|
|
|
@ -1,28 +0,0 @@
|
||||||
/* 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 http://mozilla.org/MPL/2.0/. */
|
|
||||||
|
|
||||||
//! Different static asserts that ensure the build does what it's expected to.
|
|
||||||
//!
|
|
||||||
//! TODO: maybe cfg(test) this?
|
|
||||||
|
|
||||||
#![allow(unused_imports)]
|
|
||||||
|
|
||||||
use std::mem;
|
|
||||||
|
|
||||||
macro_rules! check_enum_value {
|
|
||||||
($a:expr, $b:expr) => {
|
|
||||||
unsafe {
|
|
||||||
mem::transmute::<[u32; $a as usize],
|
|
||||||
[u32; $b as usize]>([0; $a as usize]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NB: It's a shame we can't do this statically with bitflags, but no
|
|
||||||
// const-fn and no other way to access the numerical value :-(
|
|
||||||
macro_rules! check_enum_value_non_static {
|
|
||||||
($a:expr, $b:expr) => {
|
|
||||||
assert_eq!($a.0 as usize, $b as usize);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -5,6 +5,7 @@
|
||||||
use style;
|
use style;
|
||||||
|
|
||||||
#[cfg(all(test, target_pointer_width = "64"))]
|
#[cfg(all(test, target_pointer_width = "64"))]
|
||||||
|
#[test]
|
||||||
fn size_of_specified_values() {
|
fn size_of_specified_values() {
|
||||||
use std::mem::size_of;
|
use std::mem::size_of;
|
||||||
let threshold = 24;
|
let threshold = 24;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue