aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/dom/bindings/js.rs
diff options
context:
space:
mode:
authorJack Moffitt <jack@metajack.im>2014-06-01 00:21:53 -0600
committerJack Moffitt <jack@metajack.im>2014-06-05 09:58:59 -0600
commit629c4c6afe7cea86c051bb9f52adeac716e2c43f (patch)
treeee84d9a9b37ecd37e0a9606509624e7f728f5a81 /src/components/script/dom/bindings/js.rs
parent2ae671b5aa9d27812adcdb8ebc749733156df66e (diff)
downloadservo-629c4c6afe7cea86c051bb9f52adeac716e2c43f.tar.gz
servo-629c4c6afe7cea86c051bb9f52adeac716e2c43f.zip
Upgrade Rust.
Diffstat (limited to 'src/components/script/dom/bindings/js.rs')
-rw-r--r--src/components/script/dom/bindings/js.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/components/script/dom/bindings/js.rs b/src/components/script/dom/bindings/js.rs
index 89898a35ba0..0f96f3e33e6 100644
--- a/src/components/script/dom/bindings/js.rs
+++ b/src/components/script/dom/bindings/js.rs
@@ -46,9 +46,9 @@ use js::jsapi::{JSObject, JS_AddObjectRoot, JS_RemoveObjectRoot};
use layout_interface::TrustedNodeAddress;
use script_task::StackRoots;
-use std::cast;
use std::cell::{Cell, RefCell};
use std::kinds::marker::ContravariantLifetime;
+use std::mem;
/// A type that represents a JS-owned value that is rooted for the lifetime of this value.
/// Importantly, it requires explicit rooting in order to interact with the inner value.
@@ -105,7 +105,7 @@ impl<T: Reflectable> Temporary<T> {
//XXXjdm It would be lovely if this could be private.
pub unsafe fn transmute<To>(self) -> Temporary<To> {
- cast::transmute(self)
+ mem::transmute(self)
}
}
@@ -195,7 +195,7 @@ impl<T: Reflectable> JS<T> {
/// flags. This is the only method that be safely accessed from layout. (The fact that this
/// is unsafe is what necessitates the layout wrappers.)
pub unsafe fn unsafe_get(&self) -> *mut T {
- cast::transmute_copy(&self.ptr)
+ mem::transmute_copy(&self.ptr)
}
/// Store an unrooted value in this field. This is safe under the assumption that JS<T>
@@ -209,11 +209,11 @@ impl<T: Reflectable> JS<T> {
impl<From, To> JS<From> {
//XXXjdm It would be lovely if this could be private.
pub unsafe fn transmute(self) -> JS<To> {
- cast::transmute(self)
+ mem::transmute(self)
}
pub unsafe fn transmute_copy(&self) -> JS<To> {
- cast::transmute_copy(self)
+ mem::transmute_copy(self)
}
}
@@ -492,12 +492,12 @@ impl<'a, T> Eq for JSRef<'a, T> {
impl<'a,T> JSRef<'a,T> {
//XXXjdm It would be lovely if this could be private.
pub unsafe fn transmute<'b, To>(&'b self) -> &'b JSRef<'a, To> {
- cast::transmute(self)
+ mem::transmute(self)
}
//XXXjdm It would be lovely if this could be private.
pub unsafe fn transmute_mut<'b, To>(&'b mut self) -> &'b mut JSRef<'a, To> {
- cast::transmute(self)
+ mem::transmute(self)
}
pub fn unrooted(&self) -> JS<T> {