зеркало из https://github.com/mozilla/gecko-dev.git
servo: Update for latest libcore changes.
Source-Repo: https://github.com/servo/servo Source-Revision: 93418d4cc977bb431e683e1eae2f42159ac1d89b
This commit is contained in:
Родитель
3f8b293e92
Коммит
1983508f2e
|
@ -13,7 +13,7 @@ enum DOMString {
|
|||
null_string
|
||||
}
|
||||
|
||||
type rust_box<T> = {rc: uint, td: *sys::type_desc, next: *(), prev: *(), payload: T};
|
||||
type rust_box<T> = {rc: uint, td: *sys::TypeDesc, next: *(), prev: *(), payload: T};
|
||||
|
||||
unsafe fn squirrel_away<T>(+x: @T) -> *rust_box<T> {
|
||||
let y: *rust_box<T> = unsafe::reinterpret_cast(x);
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import geom::point::Point2D;
|
||||
import geom::rect::Rect;
|
||||
import geom::size::Size2D;
|
||||
import num::num;
|
||||
import num::Num;
|
||||
|
||||
enum au = int;
|
||||
|
||||
impl au : num {
|
||||
impl au : Num {
|
||||
pure fn add(&&other: au) -> au { au(*self + *other) }
|
||||
pure fn sub(&&other: au) -> au { au(*self - *other) }
|
||||
pure fn mul(&&other: au) -> au { au(*self * *other) }
|
||||
|
@ -17,7 +17,7 @@ impl au : num {
|
|||
pure fn from_int(n: int) -> au { au(n) }
|
||||
}
|
||||
|
||||
fn box<A:copy num>(x: A, y: A, w: A, h: A) -> Rect<A> {
|
||||
fn box<A:copy Num>(x: A, y: A, w: A, h: A) -> Rect<A> {
|
||||
Rect(Point2D(x, y), Size2D(w, h))
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ import vec::{push, push_all};
|
|||
import std::net::url::url;
|
||||
import resource::image_cache_task;
|
||||
import image_cache_task::ImageCacheTask;
|
||||
import core::to_str::to_str;
|
||||
import core::to_str::ToStr;
|
||||
import std::arc::{arc, clone};
|
||||
|
||||
enum BoxKind {
|
||||
|
|
|
@ -6,7 +6,7 @@ import dom::style::{Auto, Px};
|
|||
import geom::point::Point2D;
|
||||
import geom::size::Size2D;
|
||||
import gfx::geometry::{au, px_to_au};
|
||||
import num::num;
|
||||
import num::Num;
|
||||
import util::tree;
|
||||
|
||||
trait InlineLayout {
|
||||
|
|
|
@ -13,7 +13,7 @@ import vec::{push, push_all_move, flat_map};
|
|||
import std::net::url::url;
|
||||
import resource::resource_task::{ResourceTask, Load, Payload, Done};
|
||||
import result::{ok, err};
|
||||
import to_str::to_str;
|
||||
import to_str::ToStr;
|
||||
|
||||
enum CSSMessage {
|
||||
File(url),
|
||||
|
|
|
@ -15,7 +15,7 @@ import std::arc::arc;
|
|||
import clone_arc = std::arc::clone;
|
||||
import std::cell::Cell;
|
||||
import result::{result, ok, err};
|
||||
import to_str::to_str;
|
||||
import to_str::ToStr;
|
||||
|
||||
enum Msg {
|
||||
/// Tell the cache that we may need a particular image soon. Must be posted
|
||||
|
|
|
@ -7,11 +7,11 @@
|
|||
import float::round;
|
||||
import libc::types::os::arch::c95::c_double;
|
||||
import css_colors::*;
|
||||
import cmp::eq;
|
||||
import cmp::Eq;
|
||||
|
||||
enum Color = {red : u8, green : u8, blue : u8, alpha : float};
|
||||
|
||||
impl Color : eq {
|
||||
impl Color : Eq {
|
||||
pure fn eq(&&other: Color) -> bool {
|
||||
return self.red == other.red && self.green == other.green && self.blue == other.blue &&
|
||||
self.alpha == other.alpha;
|
||||
|
|
|
@ -102,7 +102,7 @@ mod make_url_tests {
|
|||
type UrlMap<T: copy> = hashmap<url, T>;
|
||||
|
||||
fn url_map<T: copy>() -> UrlMap<T> {
|
||||
import core::to_str::to_str;
|
||||
import core::to_str::ToStr;
|
||||
|
||||
hashmap::<url, T>(|a| str::hash(&a.to_str()),
|
||||
|a, b| str::eq(&a.to_str(), &b.to_str()))
|
||||
|
|
Загрузка…
Ссылка в новой задаче