auto merge of #4739 : Manishearth/servo/warning-patrol, r=Ms2ger

This commit is contained in:
bors-servo 2015-01-28 02:27:50 -07:00
commit d373f8dc26
34 changed files with 50 additions and 53 deletions

View file

@ -51,7 +51,7 @@ pub struct CallbackInterface {
/// A common base class for representing IDL callback function and
/// callback interface types.
#[allow(raw_pointer_deriving)]
#[allow(raw_pointer_derive)]
#[derive(Copy, Clone,PartialEq)]
#[jstraceable]
struct CallbackObject {

View file

@ -175,10 +175,9 @@ impl<T: Reflectable> JS<T> {
}
}
#[old_impl_check]
impl<T: Assignable<U>, U: Reflectable> JS<U> {
impl<U: Reflectable> JS<U> {
/// Create a `JS<T>` from any JS-managed pointer.
pub fn from_rooted(root: T) -> JS<U> {
pub fn from_rooted<T: Assignable<U>>(root: T) -> JS<U> {
unsafe {
root.get_js()
}
@ -246,10 +245,9 @@ pub struct MutNullableJS<T: Reflectable> {
ptr: Cell<Option<JS<T>>>
}
#[old_impl_check]
impl<T: Assignable<U>, U: Reflectable> MutNullableJS<U> {
impl<U: Reflectable> MutNullableJS<U> {
/// Create a new `MutNullableJS`
pub fn new(initial: Option<T>) -> MutNullableJS<U> {
pub fn new<T: Assignable<U>>(initial: Option<T>) -> MutNullableJS<U> {
MutNullableJS {
ptr: Cell::new(initial.map(|initial| {
unsafe { initial.get_js() }
@ -326,16 +324,15 @@ impl<T: Reflectable> JS<T> {
}
}
#[old_impl_check]
impl<From, To> JS<From> {
impl<From> JS<From> {
/// Return `self` as a `JS` of another type.
//XXXjdm It would be lovely if this could be private.
pub unsafe fn transmute(self) -> JS<To> {
pub unsafe fn transmute<To>(self) -> JS<To> {
mem::transmute(self)
}
/// Return `self` as a `JS` of another type.
pub unsafe fn transmute_copy(&self) -> JS<To> {
pub unsafe fn transmute_copy<To>(&self) -> JS<To> {
mem::transmute_copy(self)
}
}

View file

@ -47,7 +47,7 @@ use js;
/// Proxy handler for a WindowProxy.
pub struct WindowProxyHandler(pub *const libc::c_void);
#[allow(raw_pointer_deriving)]
#[allow(raw_pointer_derive)]
#[jstraceable]
/// Static data associated with a global object.
pub struct GlobalStaticData {
@ -352,7 +352,7 @@ pub fn reflect_dom_object<T: Reflectable>
/// A struct to store a reference to the reflector of a DOM object.
// Allowing unused_attribute because the lint sometimes doesn't run in order
#[allow(raw_pointer_deriving, unrooted_must_root, unused_attributes)]
#[allow(raw_pointer_derive, unrooted_must_root, unused_attributes)]
#[derive(PartialEq)]
#[must_root]
#[servo_lang = "reflector"]