Remove some old impls

This commit is contained in:
Manish Goregaokar 2015-01-28 13:37:18 +05:30
parent 3f9012864a
commit e44ee70faf

View file

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