Update rustc to revision 2cfb5acb5a2751c759627377e602bac4f88f2d19.

This commit is contained in:
Ms2ger 2015-01-02 12:45:28 +01:00 committed by Josh Matthews
parent cf616b90a2
commit 16c7060bc8
153 changed files with 2095 additions and 1298 deletions

View file

@ -16,7 +16,7 @@ macro_rules! define_css_keyword_enum {
};
($name: ident: $( $css: expr => $variant: ident ),+) => {
#[allow(non_camel_case_types)]
#[deriving(Clone, Eq, PartialEq, FromPrimitive)]
#[deriving(Clone, Eq, PartialEq, FromPrimitive, Copy)]
pub enum $name {
$( $variant ),+
}
@ -138,7 +138,7 @@ pub mod specified {
}
}
#[deriving(Clone, PartialEq)]
#[deriving(Clone, PartialEq, Copy)]
pub enum Length {
Au(Au), // application units
Em(CSSFloat),
@ -219,7 +219,7 @@ pub mod specified {
}
}
#[deriving(Clone, PartialEq)]
#[deriving(Clone, PartialEq, Copy)]
pub enum LengthOrPercentage {
Length(Length),
Percentage(CSSFloat), // [0 .. 100%] maps to [0.0 .. 1.0]
@ -263,7 +263,7 @@ pub mod specified {
}
}
#[deriving(Clone)]
#[deriving(Clone, PartialEq, Copy)]
pub enum LengthOrPercentageOrAuto {
Length(Length),
Percentage(CSSFloat), // [0 .. 100%] maps to [0.0 .. 1.0]
@ -309,7 +309,7 @@ pub mod specified {
}
}
#[deriving(Clone)]
#[deriving(Clone, PartialEq, Copy)]
pub enum LengthOrPercentageOrNone {
Length(Length),
Percentage(CSSFloat), // [0 .. 100%] maps to [0.0 .. 1.0]
@ -355,7 +355,7 @@ pub mod specified {
}
// http://dev.w3.org/csswg/css2/colors.html#propdef-background-position
#[deriving(Clone)]
#[deriving(Clone, PartialEq, Copy)]
pub enum PositionComponent {
Length(Length),
Percentage(CSSFloat), // [0 .. 100%] maps to [0.0 .. 1.0]
@ -395,7 +395,7 @@ pub mod specified {
}
}
#[deriving(Clone, PartialEq, PartialOrd)]
#[deriving(Clone, PartialEq, PartialOrd, Copy)]
pub struct Angle(pub CSSFloat);
impl fmt::Show for Angle {
@ -452,7 +452,7 @@ pub mod specified {
match self {
&Image::Url(ref url) => {
try!(dest.write_str("url(\""));
try!(write!(CssStringWriter::new(dest), "{}", url));
try!(write!(&mut CssStringWriter::new(dest), "{}", url));
try!(dest.write_str("\")"));
Ok(())
}
@ -522,7 +522,7 @@ pub mod specified {
}
/// Specified values for an angle or a corner in a linear gradient.
#[deriving(Clone, PartialEq)]
#[deriving(Clone, PartialEq, Copy)]
pub enum AngleOrCorner {
Angle(Angle),
Corner(HorizontalDirection, VerticalDirection),
@ -718,6 +718,7 @@ pub mod computed {
use std::fmt;
use url::Url;
#[allow(missing_copy_implementations)] // Its kinda big
pub struct Context {
pub inherited_font_weight: longhands::font_weight::computed_value::T,
pub inherited_font_size: longhands::font_size::computed_value::T,
@ -774,7 +775,7 @@ pub mod computed {
}
}
#[deriving(PartialEq, Clone)]
#[deriving(PartialEq, Clone, Copy)]
pub enum LengthOrPercentage {
Length(Au),
Percentage(CSSFloat),
@ -799,7 +800,7 @@ pub mod computed {
}
}
#[deriving(PartialEq, Clone)]
#[deriving(PartialEq, Clone, Copy)]
pub enum LengthOrPercentageOrAuto {
Length(Au),
Percentage(CSSFloat),
@ -827,7 +828,7 @@ pub mod computed {
}
}
#[deriving(PartialEq, Clone)]
#[deriving(PartialEq, Clone, Copy)]
pub enum LengthOrPercentageOrNone {
Length(Au),
Percentage(CSSFloat),
@ -892,7 +893,7 @@ pub mod computed {
}
/// Computed values for one color stop in a linear gradient.
#[deriving(Clone, PartialEq)]
#[deriving(Clone, PartialEq, Copy)]
pub struct ColorStop {
/// The color of this stop.
pub color: CSSColor,

View file

@ -7,9 +7,9 @@
pub use std::ascii::AsciiExt;
use std::fmt;
use std::fmt::Show;
use std::sync::Arc;
use servo_util::logical_geometry::{WritingMode, LogicalMargin};
use sync::Arc;
pub use url::Url;
pub use cssparser::*;
@ -279,7 +279,7 @@ pub mod longhands {
% endfor
<%self:longhand name="border-top-left-radius">
#[deriving(Clone, Show)]
#[deriving(Clone, Show, PartialEq, Copy)]
pub struct SpecifiedValue {
pub radius: specified::LengthOrPercentage,
}
@ -287,7 +287,7 @@ pub mod longhands {
pub mod computed_value {
use super::super::computed;
#[deriving(Clone, PartialEq, Show)]
#[deriving(Clone, PartialEq, Copy, Show)]
pub struct T {
pub radius: computed::LengthOrPercentage,
}
@ -451,7 +451,7 @@ pub mod longhands {
pub mod computed_value {
use std::fmt;
#[deriving(PartialEq, Clone)]
#[deriving(PartialEq, Clone, Eq, Copy)]
pub enum T {
Auto,
Number(i32),
@ -543,7 +543,7 @@ pub mod longhands {
<%self:single_component_value name="line-height">
use std::fmt;
#[deriving(Clone)]
#[deriving(Clone, PartialEq, Copy)]
pub enum SpecifiedValue {
Normal,
Length(specified::Length),
@ -579,7 +579,7 @@ pub mod longhands {
pub mod computed_value {
use super::super::{Au, CSSFloat};
use std::fmt;
#[deriving(PartialEq, Clone)]
#[deriving(PartialEq, Copy, Clone)]
pub enum T {
Normal,
Length(Au),
@ -616,7 +616,7 @@ pub mod longhands {
<% vertical_align_keywords = (
"baseline sub super top text-top middle bottom text-bottom".split()) %>
#[allow(non_camel_case_types)]
#[deriving(Clone)]
#[deriving(Clone, PartialEq, Copy)]
pub enum SpecifiedValue {
% for keyword in vertical_align_keywords:
${to_rust_ident(keyword)},
@ -654,7 +654,7 @@ pub mod longhands {
use super::super::{Au, CSSFloat};
use std::fmt;
#[allow(non_camel_case_types)]
#[deriving(PartialEq, Clone)]
#[deriving(PartialEq, Copy, Clone)]
pub enum T {
% for keyword in vertical_align_keywords:
${to_rust_ident(keyword)},
@ -710,7 +710,7 @@ pub mod longhands {
pub use super::computed_as_specified as to_computed_value;
pub mod computed_value {
use std::fmt;
#[deriving(PartialEq, Clone)]
#[deriving(PartialEq, Eq, Clone)]
pub enum ContentItem {
StringContent(String),
}
@ -722,7 +722,7 @@ pub mod longhands {
}
}
#[allow(non_camel_case_types)]
#[deriving(PartialEq, Clone)]
#[deriving(PartialEq, Eq, Clone)]
pub enum T {
normal,
none,
@ -859,7 +859,7 @@ pub mod longhands {
use super::super::super::common_types::computed::LengthOrPercentage;
use std::fmt;
#[deriving(PartialEq, Clone)]
#[deriving(PartialEq, Copy, Clone)]
pub struct T {
pub horizontal: LengthOrPercentage,
pub vertical: LengthOrPercentage,
@ -871,7 +871,7 @@ pub mod longhands {
}
}
#[deriving(Clone)]
#[deriving(Clone, PartialEq, Copy)]
pub struct SpecifiedValue {
pub horizontal: specified::LengthOrPercentage,
pub vertical: specified::LengthOrPercentage,
@ -1023,7 +1023,7 @@ pub mod longhands {
pub use super::computed_as_specified as to_computed_value;
pub mod computed_value {
use std::fmt;
#[deriving(PartialEq, Clone)]
#[deriving(PartialEq, Eq, Clone)]
pub enum FontFamily {
FamilyName(String),
// Generic
@ -1110,7 +1110,7 @@ pub mod longhands {
<%self:single_component_value name="font-weight">
use std::fmt;
#[deriving(Clone)]
#[deriving(Clone, PartialEq, Eq, Copy)]
pub enum SpecifiedValue {
Bolder,
Lighter,
@ -1159,7 +1159,7 @@ pub mod longhands {
}
pub mod computed_value {
use std::fmt;
#[deriving(PartialEq, Clone)]
#[deriving(PartialEq, Eq, Copy, Clone)]
pub enum T {
% for weight in range(100, 901, 100):
Weight${weight},
@ -1327,7 +1327,7 @@ pub mod longhands {
<%self:longhand name="text-decoration">
pub use super::computed_as_specified as to_computed_value;
use std::fmt;
#[deriving(PartialEq, Clone)]
#[deriving(PartialEq, Eq, Copy, Clone)]
pub struct SpecifiedValue {
pub underline: bool,
pub overline: bool,
@ -1404,7 +1404,7 @@ pub mod longhands {
derived_from="display text-decoration">
pub use super::computed_as_specified as to_computed_value;
#[deriving(Clone, PartialEq)]
#[deriving(Clone, PartialEq, Copy)]
pub struct SpecifiedValue {
pub underline: Option<RGBA>,
pub overline: Option<RGBA>,
@ -1516,7 +1516,7 @@ pub mod longhands {
pub mod computed_value {
use servo_util::cursor::Cursor;
#[deriving(Clone, PartialEq, Show)]
#[deriving(Clone, PartialEq, Eq, Copy, Show)]
pub enum T {
AutoCursor,
SpecifiedCursor(Cursor),
@ -1581,7 +1581,7 @@ pub mod longhands {
pub type SpecifiedValue = Vec<SpecifiedBoxShadow>;
#[deriving(Clone)]
#[deriving(Clone, PartialEq)]
pub struct SpecifiedBoxShadow {
pub offset_x: specified::Length,
pub offset_y: specified::Length,
@ -1612,7 +1612,7 @@ pub mod longhands {
pub type T = Vec<BoxShadow>;
#[deriving(Clone, PartialEq)]
#[deriving(Clone, PartialEq, Copy)]
pub struct BoxShadow {
pub offset_x: Au,
pub offset_y: Au,
@ -1750,7 +1750,7 @@ pub mod longhands {
pub mod computed_value {
use super::super::Au;
#[deriving(Clone, PartialEq, Show)]
#[deriving(Clone, PartialEq, Eq, Copy, Show)]
pub struct ClipRect {
pub top: Au,
pub right: Option<Au>,
@ -1761,7 +1761,7 @@ pub mod longhands {
pub type T = Option<ClipRect>;
}
#[deriving(Clone, Show)]
#[deriving(Clone, Show, PartialEq, Copy)]
pub struct SpecifiedClipRect {
pub top: specified::Length,
pub right: Option<specified::Length>,
@ -2468,7 +2468,7 @@ impl CSSWideKeyword {
}
#[deriving(Clone)]
#[deriving(Clone, PartialEq, Eq, Copy)]
pub enum DeclaredValue<T> {
SpecifiedValue(T),
Initial,
@ -2496,6 +2496,7 @@ pub enum PropertyDeclaration {
}
#[deriving(Eq, PartialEq, Copy)]
pub enum PropertyDeclarationParseResult {
UnknownProperty,
ExperimentalProperty,
@ -2645,6 +2646,7 @@ pub mod style_structs {
use super::longhands;
% for style_struct in STYLE_STRUCTS:
#[allow(missing_copy_implementations)]
#[deriving(PartialEq, Clone)]
pub struct ${style_struct.name} {
% for longhand in style_struct.longhands: