diff options
author | Manish Goregaokar <manishsmail@gmail.com> | 2015-01-28 13:37:18 +0530 |
---|---|---|
committer | Manish Goregaokar <manishsmail@gmail.com> | 2015-01-28 13:37:18 +0530 |
commit | e44ee70faff95763185a64544907a88466fa94a8 (patch) | |
tree | 7f7ce0a2e989754b955abfda210555fb90743e10 /components/script/dom | |
parent | 3f9012864a2cd927cf17a8e11dfa6922add1b7df (diff) | |
download | servo-e44ee70faff95763185a64544907a88466fa94a8.tar.gz servo-e44ee70faff95763185a64544907a88466fa94a8.zip |
Remove some old impls
Diffstat (limited to 'components/script/dom')
-rw-r--r-- | components/script/dom/bindings/js.rs | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/components/script/dom/bindings/js.rs b/components/script/dom/bindings/js.rs index 637ee079a4d..063c934580d 100644 --- a/components/script/dom/bindings/js.rs +++ b/components/script/dom/bindings/js.rs @@ -177,10 +177,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() } @@ -248,10 +247,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() } @@ -328,16 +326,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) } } |