aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/bindings')
-rw-r--r--components/script/dom/bindings/callback.rs2
-rw-r--r--components/script/dom/bindings/js.rs17
-rw-r--r--components/script/dom/bindings/utils.rs4
3 files changed, 10 insertions, 13 deletions
diff --git a/components/script/dom/bindings/callback.rs b/components/script/dom/bindings/callback.rs
index 5df336d3fe5..dd0bf8bf65c 100644
--- a/components/script/dom/bindings/callback.rs
+++ b/components/script/dom/bindings/callback.rs
@@ -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 {
diff --git a/components/script/dom/bindings/js.rs b/components/script/dom/bindings/js.rs
index b768489122d..2551b5178da 100644
--- a/components/script/dom/bindings/js.rs
+++ b/components/script/dom/bindings/js.rs
@@ -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)
}
}
diff --git a/components/script/dom/bindings/utils.rs b/components/script/dom/bindings/utils.rs
index 47543b1f61f..2819018cf27 100644
--- a/components/script/dom/bindings/utils.rs
+++ b/components/script/dom/bindings/utils.rs
@@ -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"]