Upgrade to latest Rust.

This commit is contained in:
Manish Goregaokar 2014-06-18 20:49:03 +05:30 committed by Jack Moffitt
parent 56dd5b943e
commit f5b5b337d3
99 changed files with 269 additions and 253 deletions

View file

@ -24,7 +24,7 @@ pub enum ExceptionHandling {
RethrowExceptions
}
#[deriving(Clone,Eq,Encodable)]
#[deriving(Clone,PartialEq,Encodable)]
pub struct CallbackFunction {
object: CallbackObject
}
@ -39,13 +39,13 @@ impl CallbackFunction {
}
}
#[deriving(Clone,Eq,Encodable)]
#[deriving(Clone,PartialEq,Encodable)]
pub struct CallbackInterface {
object: CallbackObject
}
#[allow(raw_pointer_deriving)]
#[deriving(Clone,Eq,Encodable)]
#[deriving(Clone,PartialEq,Encodable)]
struct CallbackObject {
callback: Traceable<*mut JSObject>,
}

View file

@ -2707,7 +2707,7 @@ use js::jsapi::JSContext;
use js::jsval::JSVal;
#[repr(uint)]
#[deriving(Encodable, Eq)]
#[deriving(Encodable, PartialEq)]
pub enum valuelist {
%s
}
@ -4756,7 +4756,7 @@ class CGCallback(CGClass):
bases=[ClassBase(baseName)],
constructors=self.getConstructors(),
methods=realMethods+getters+setters,
decorators="#[deriving(Eq,Clone,Encodable)]")
decorators="#[deriving(PartialEq,Clone,Encodable)]")
def getConstructors(self):
return [ClassConstructor(
@ -5262,7 +5262,7 @@ class GlobalGenRoots():
return CGList([
CGGeneric(AUTOGENERATED_WARNING_COMMENT),
CGGeneric("pub static MAX_PROTO_CHAIN_LENGTH: uint = %d;\n\n" % config.maxProtoChainLength),
CGNamespacedEnum('id', 'ID', protos, [0], deriving="Eq"),
CGNamespacedEnum('id', 'ID', protos, [0], deriving="PartialEq"),
])

View file

@ -228,7 +228,7 @@ impl ToJSValConvertible for DOMString {
}
}
#[deriving(Eq)]
#[deriving(PartialEq)]
pub enum StringificationBehavior {
Default,
Empty,

View file

@ -63,7 +63,7 @@ pub struct Temporary<T> {
js_ptr: *mut JSObject,
}
impl<T> Eq for Temporary<T> {
impl<T> PartialEq for Temporary<T> {
fn eq(&self, other: &Temporary<T>) -> bool {
self.inner == other.inner
}
@ -106,7 +106,7 @@ pub struct JS<T> {
ptr: *T
}
impl<T> Eq for JS<T> {
impl<T> PartialEq for JS<T> {
fn eq(&self, other: &JS<T>) -> bool {
self.ptr == other.ptr
}
@ -455,7 +455,7 @@ impl<'a, T> Clone for JSRef<'a, T> {
}
}
impl<'a, T> Eq for JSRef<'a, T> {
impl<'a, T> PartialEq for JSRef<'a, T> {
fn eq(&self, other: &JSRef<T>) -> bool {
self.ptr == other.ptr
}

View file

@ -7,7 +7,7 @@ use std::hash::{Hash, sip};
use std::path::BytesContainer;
use std::str;
#[deriving(Encodable,Clone,TotalEq,Eq)]
#[deriving(Encodable,Clone,Eq,PartialEq)]
pub struct ByteString(Vec<u8>);
impl ByteString {
@ -66,7 +66,7 @@ impl ByteString {
pub fn is_field_value(&self) -> bool {
// Classifications of characters necessary for the [CRLF] (SP|HT) rule
#[deriving(Eq)]
#[deriving(PartialEq)]
enum PreviousCharacter {
Other,
CR,

View file

@ -116,7 +116,7 @@ impl<T> DerefMut<T> for Untraceable<T> {
///
/// We always prefer this, in case the contained type ever changes to something that should be traced.
/// See more details: mozilla#2662.
#[deriving(Eq, Clone)]
#[deriving(PartialEq, Clone)]
pub struct Traceable<T> {
inner: T
}

View file

@ -11,12 +11,12 @@ use dom::browsercontext;
use dom::window;
use servo_util::str::DOMString;
use collections::hashmap::HashMap;
use std::collections::hashmap::HashMap;
use libc;
use libc::c_uint;
use std::cell::Cell;
use std::cmp::Eq;
use std::mem;
use std::cmp::PartialEq;
use std::ptr;
use std::ptr::null;
use std::slice;
@ -383,7 +383,7 @@ pub fn reflect_dom_object<T: Reflectable>
}
#[allow(raw_pointer_deriving)]
#[deriving(Eq)]
#[deriving(PartialEq)]
pub struct Reflector {
object: Cell<*mut JSObject>,
}
@ -608,7 +608,7 @@ pub fn cx_for_dom_object<T: Reflectable>(obj: &T) -> *mut JSContext {
/// Check if an element name is valid. See http://www.w3.org/TR/xml/#NT-Name
/// for details.
#[deriving(Eq)]
#[deriving(PartialEq)]
pub enum XMLName {
QName,
Name,