Upgrade rustc to d3c49d2140fc65e8bb7d7cf25bfe74dda6ce5ecf/rustc-1.0.0-dev.

This commit is contained in:
Ms2ger 2015-03-11 11:08:57 +01:00 committed by Josh Matthews
parent 65d4b12bf2
commit 5f15eb5fbf
140 changed files with 1420 additions and 1222 deletions

View file

@ -30,13 +30,13 @@ git = "https://github.com/Kimundi/lazy-static.rs"
[dependencies.string_cache]
git = "https://github.com/servo/string-cache"
[dependencies.string_cache_macros]
[dependencies.string_cache_plugin]
git = "https://github.com/servo/string-cache"
[dependencies]
text_writer = "0.1.1"
encoding = "0.2"
rustc-serialize = "0.2"
rustc-serialize = "0.3"
matches = "0.1"
url = "0.2.16"
mod_path = "0.1"

View file

@ -2,7 +2,7 @@
* 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/. */
#![feature(path, io, env)]
#![feature(env, old_io, old_path)]
use std::env;
use std::old_path::Path;
@ -28,6 +28,6 @@ fn main() {
.output()
.unwrap();
assert_eq!(result.status, ProcessExit::ExitStatus(0));
let out = Path::new(env::var_string("OUT_DIR").unwrap());
let out = Path::new(env::var("OUT_DIR").unwrap());
File::create(&out.join("properties.rs")).unwrap().write_all(&*result.output).unwrap();
}

View file

@ -66,14 +66,13 @@ pub trait PresentationalHintSynthesis {
/// `common_style_affecting_attributes` or `rare_style_affecting_attributes` as appropriate. If
/// you don't, you risk strange random nondeterministic failures due to false positives in
/// style sharing.
fn synthesize_presentational_hints_for_legacy_attributes<'a,E,N,V>(
fn synthesize_presentational_hints_for_legacy_attributes<'a,N,V>(
&self,
node: &N,
matching_rules_list: &mut V,
shareable: &mut bool)
where E: TElement<'a> +
TElementAttributes,
N: TNode<'a,E>,
where N: TNode<'a>,
N::Element: TElementAttributes,
V: VecLike<DeclarationBlock<Vec<PropertyDeclaration>>>;
/// Synthesizes rules for the legacy `bgcolor` attribute.
fn synthesize_presentational_hint_for_legacy_background_color_attribute<'a,E,V>(
@ -100,14 +99,13 @@ pub trait PresentationalHintSynthesis {
}
impl PresentationalHintSynthesis for Stylist {
fn synthesize_presentational_hints_for_legacy_attributes<'a,E,N,V>(
fn synthesize_presentational_hints_for_legacy_attributes<'a,N,V>(
&self,
node: &N,
matching_rules_list: &mut V,
shareable: &mut bool)
where E: TElement<'a> +
TElementAttributes,
N: TNode<'a,E>,
where N: TNode<'a>,
N::Element: TElementAttributes,
V: VecLike<DeclarationBlock<Vec<PropertyDeclaration>>> {
let element = node.as_element();
match element.get_local_name() {

View file

@ -12,9 +12,11 @@
#![allow(missing_copy_implementations)]
#![plugin(string_cache_plugin)]
#![plugin(mod_path)]
#[macro_use] extern crate log;
#[macro_use] extern crate bitflags;
#[no_link] #[macro_use] #[plugin] extern crate string_cache_macros;
extern crate collections;
extern crate geom;
@ -37,8 +39,6 @@ extern crate lazy_static;
extern crate util;
#[plugin] #[no_link] extern crate mod_path;
pub mod stylesheets;
pub mod parser;

View file

@ -3886,26 +3886,24 @@ pub mod shorthands {
// TODO(SimonSapin): Convert this to a syntax extension rather than a Mako template.
// Maybe submit for inclusion in libstd?
mod property_bit_field {
use std::uint;
use std::mem;
pub struct PropertyBitField {
storage: [uint; (${len(LONGHANDS)} - 1 + uint::BITS) / uint::BITS]
storage: [u32; (${len(LONGHANDS)} - 1 + 32) / 32]
}
impl PropertyBitField {
#[inline]
pub fn new() -> PropertyBitField {
PropertyBitField { storage: unsafe { mem::zeroed() } }
PropertyBitField { storage: [0; (${len(LONGHANDS)} - 1 + 32) / 32] }
}
#[inline]
fn get(&self, bit: uint) -> bool {
(self.storage[bit / uint::BITS] & (1 << (bit % uint::BITS))) != 0
(self.storage[bit / 32] & (1 << (bit % 32))) != 0
}
#[inline]
fn set(&mut self, bit: uint) {
self.storage[bit / uint::BITS] |= 1 << (bit % uint::BITS)
self.storage[bit / 32] |= 1 << (bit % 32)
}
% for i, property in enumerate(LONGHANDS):
% if property.derived_from is None:

View file

@ -169,7 +169,7 @@ impl Stylist {
/// The returned boolean indicates whether the style is *shareable*; that is, whether the
/// matched selectors are simple enough to allow the matching logic to be reduced to the logic
/// in `css::matching::PrivateMatchMethods::candidate_element_allows_for_style_sharing`.
pub fn push_applicable_declarations<'a,E,N,V>(
pub fn push_applicable_declarations<'a,N,V>(
&self,
element: &N,
parent_bf: &Option<Box<BloomFilter>>,
@ -177,8 +177,8 @@ impl Stylist {
pseudo_element: Option<PseudoElement>,
applicable_declarations: &mut V)
-> bool
where E: TElement<'a> + TElementAttributes,
N: TNode<'a,E>,
where N: TNode<'a>,
N::Element: TElementAttributes,
V: VecLike<DeclarationBlock> {
assert!(!self.is_dirty);
assert!(element.is_element());

View file

@ -873,6 +873,7 @@ pub mod computed {
use geom::size::Size2D;
use properties::longhands;
use std::fmt;
use std::marker::MarkerTrait;
use std::ops::{Add, Mul};
use url::Url;
use util::geometry::Au;
@ -909,7 +910,7 @@ pub mod computed {
fn to_computed_value(&self, _context: &Context) -> Self::ComputedValue;
}
pub trait ComputedValueAsSpecified {}
pub trait ComputedValueAsSpecified: MarkerTrait {}
impl<T> ToComputedValue for T where T: ComputedValueAsSpecified + Clone {
type ComputedValue = T;