Make it possible to build the style_traits crate with a stable compiler.

Testing this on CI to make sure we don’t regress it is blocked on #11806
This commit is contained in:
Simon Sapin 2016-06-21 13:55:50 +02:00
parent b9b289c4be
commit ea73c8efac
20 changed files with 145 additions and 89 deletions

View file

@ -23,7 +23,8 @@ use url::{self, Url};
/// Global flags for Servo, currently set on the command line.
#[derive(Clone, Deserialize, Serialize)]
#[derive(Clone)]
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
pub struct Opts {
pub is_running_problem_test: bool,
@ -379,7 +380,8 @@ pub fn print_debug_usage(app: &str) -> ! {
process::exit(0)
}
#[derive(Clone, Deserialize, Serialize)]
#[derive(Clone)]
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
pub enum OutputOptions {
FileName(String),
Stdout(f64)
@ -404,7 +406,8 @@ enum UserAgent {
Android,
}
#[derive(Clone, Debug, Eq, Deserialize, PartialEq, Serialize)]
#[derive(Clone, Debug, Eq, PartialEq)]
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
pub enum RenderApi {
GL,
ES2,
@ -858,7 +861,7 @@ pub fn set_defaults(opts: Opts) {
unsafe {
assert!(DEFAULT_OPTIONS.is_null());
assert!(DEFAULT_OPTIONS != INVALID_OPTIONS);
let box_opts = box opts;
let box_opts = Box::new(opts);
DEFAULT_OPTIONS = Box::into_raw(box_opts);
}
}