Upgrade to rustc 0.12.0-pre (4d2af3861 2014-09-17 15:51:11 +0000)

This commit is contained in:
Keegan McAllister 2014-09-16 13:00:18 -07:00
parent 8a7eefefd5
commit a640a7c5c3
74 changed files with 459 additions and 449 deletions

View file

@ -24,8 +24,8 @@ extern crate cssparser;
extern crate encoding;
#[phase(plugin)]
extern crate servo_macros = "macros";
extern crate servo_util = "util";
extern crate "macros" as servo_macros;
extern crate "util" as servo_util;
// Public API

View file

@ -71,11 +71,11 @@ pub fn parse_comma_separated<T>(iter: ParserIter,
parse_one: |ParserIter| -> Result<T, ()>)
-> Result<Vec<T>, ()> {
let mut values = vec![try!(parse_one(iter))];
for component_value in iter {
match component_value {
&Comma => values.push(try!(parse_one(iter))),
_ => return Err(())
loop {
match iter.next() {
Some(&Comma) => values.push(try!(parse_one(iter))),
Some(_) => return Err(()),
None => return Ok(values),
}
}
Ok(values)
}

View file

@ -17,7 +17,7 @@ pub mod specified {
use cssparser::ast;
use cssparser::ast::*;
use super::{Au, CSSFloat};
pub use CSSColor = cssparser::Color;
pub use cssparser::Color as CSSColor;
#[deriving(Clone)]
pub enum Length {
@ -204,11 +204,10 @@ pub mod specified {
}
pub mod computed {
pub use CSSColor = cssparser::Color;
pub use compute_CSSColor = super::super::longhands::computed_as_specified;
pub use cssparser::Color as CSSColor;
pub use super::super::longhands::computed_as_specified as compute_CSSColor;
use super::*;
use super::super::longhands;
pub use servo_util::geometry::Au;
pub struct Context {
pub inherited_font_weight: longhands::font_weight::computed_value::T,

View file

@ -189,13 +189,13 @@ pub mod longhands {
values="${values}"
experimental="${experimental}">
// The computed value is the same as the specified value.
pub use to_computed_value = super::computed_as_specified;
pub use super::computed_as_specified as to_computed_value;
</%self:single_keyword_computed>
</%def>
<%def name="predefined_type(name, type, initial_value, parse_method='parse')">
<%self:single_component_value name="${name}">
pub use to_computed_value = super::super::common_types::computed::compute_${type};
pub use super::super::common_types::computed::compute_${type} as to_computed_value;
pub type SpecifiedValue = specified::${type};
pub mod computed_value {
pub type T = super::super::computed::${type};
@ -425,12 +425,7 @@ pub mod longhands {
</%self:single_component_value>
<%self:longhand name="-servo-minimum-line-height" derived_from="line-height">
use super::Au;
use super::super::common_types::DEFAULT_LINE_HEIGHT;
use super::super::longhands::display;
use super::super::longhands::line_height;
pub use to_computed_value = super::computed_as_specified;
pub use super::computed_as_specified as to_computed_value;
pub type SpecifiedValue = line_height::SpecifiedValue;
@ -534,7 +529,7 @@ pub mod longhands {
${switch_to_style_struct("Box")}
<%self:longhand name="content">
pub use to_computed_value = super::computed_as_specified;
pub use super::computed_as_specified as to_computed_value;
pub mod computed_value {
#[deriving(PartialEq, Clone)]
pub enum Content {
@ -585,7 +580,7 @@ pub mod longhands {
<%self:single_component_value name="background-image">
// The computed value is the same as the specified value.
pub use to_computed_value = super::computed_as_specified;
pub use super::computed_as_specified as to_computed_value;
pub mod computed_value {
pub use url::Url;
pub type T = Option<Url>;
@ -609,8 +604,6 @@ pub mod longhands {
</%self:single_component_value>
<%self:longhand name="background-position">
use super::super::common_types::specified;
pub mod computed_value {
use super::super::super::common_types::computed::LengthOrPercentage;
@ -723,7 +716,7 @@ pub mod longhands {
${new_style_struct("Color", is_inherited=True)}
<%self:raw_longhand name="color">
pub use to_computed_value = super::computed_as_specified;
pub use super::computed_as_specified as to_computed_value;
pub type SpecifiedValue = RGBA;
pub mod computed_value {
pub type T = super::SpecifiedValue;
@ -746,7 +739,7 @@ pub mod longhands {
${new_style_struct("Font", is_inherited=True)}
<%self:longhand name="font-family">
pub use to_computed_value = super::computed_as_specified;
pub use super::computed_as_specified as to_computed_value;
pub mod computed_value {
#[deriving(PartialEq, Clone)]
pub enum FontFamily {
@ -790,16 +783,17 @@ pub mod longhands {
}
_ => return Err(())
};
for component_value in iter {
match component_value {
&Ident(ref value) => {
loop {
match iter.next() {
Some(&Ident(ref value)) => {
idents.push(value.as_slice());
iter.next();
},
_ => {
}
Some(component_value) => {
iter.push_back(component_value);
break
}
None => break,
}
}
Ok(FamilyName(idents.connect(" ")))
@ -947,7 +941,7 @@ pub mod longhands {
${new_style_struct("Text", is_inherited=False)}
<%self:longhand name="text-decoration">
pub use to_computed_value = super::computed_as_specified;
pub use super::computed_as_specified as to_computed_value;
#[deriving(PartialEq, Clone)]
pub struct SpecifiedValue {
pub underline: bool,
@ -999,10 +993,7 @@ pub mod longhands {
<%self:longhand name="-servo-text-decorations-in-effect"
derived_from="display text-decoration">
use super::RGBA;
use super::super::longhands::display;
pub use to_computed_value = super::computed_as_specified;
pub use super::computed_as_specified as to_computed_value;
#[deriving(Clone, PartialEq)]
pub struct SpecifiedValue {
@ -1857,7 +1848,7 @@ fn initial_writing_mode_is_empty() {
trait ArcExperimental<T> {
fn make_unique_experimental<'a>(&'a mut self) -> &'a mut T;
}
impl<T: Send + Share + Clone> ArcExperimental<T> for Arc<T> {
impl<T: Send + Sync + Clone> ArcExperimental<T> for Arc<T> {
#[inline]
#[allow(experimental)]
fn make_unique_experimental<'a>(&'a mut self) -> &'a mut T {
@ -2209,10 +2200,10 @@ pub fn cascade_anonymous(parent_style: &ComputedValues) -> ComputedValues {
// Only re-export the types for computed values.
pub mod computed_values {
% for property in LONGHANDS:
pub use ${property.ident} = super::longhands::${property.ident}::computed_value;
pub use super::longhands::${property.ident}::computed_value as ${property.ident};
% endfor
// Don't use a side-specific name needlessly:
pub use border_style = super::longhands::border_top_style::computed_value;
pub use super::longhands::border_top_style::computed_value as border_style;
pub use cssparser::RGBA;
pub use super::common_types::computed::{