aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/macros/macros.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/macros/macros.rs
parent2ae671b5aa9d27812adcdb8ebc749733156df66e (diff)
downloadservo-629c4c6afe7cea86c051bb9f52adeac716e2c43f.tar.gz
servo-629c4c6afe7cea86c051bb9f52adeac716e2c43f.zip
Upgrade Rust.
Diffstat (limited to 'src/components/macros/macros.rs')
-rw-r--r--src/components/macros/macros.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/components/macros/macros.rs b/src/components/macros/macros.rs
index a90be49ca9f..30cf4baf9fe 100644
--- a/src/components/macros/macros.rs
+++ b/src/components/macros/macros.rs
@@ -47,7 +47,7 @@ macro_rules! lazy_init(
static mut s: *$T = 0 as *$T;
static mut ONCE: ::sync::one::Once = ::sync::one::ONCE_INIT;
ONCE.doit(|| {
- s = ::std::cast::transmute::<Box<$T>, *$T>(box () ($e));
+ s = ::std::mem::transmute::<Box<$T>, *$T>(box () ($e));
});
&*s
}
@@ -66,7 +66,7 @@ mod tests {
lazy_init! {
static ref NUMBER: uint = times_two(3);
static ref VEC: [Box<uint>, ..3] = [box 1, box 2, box 3];
- static ref OWNED_STRING: ~str = "hello".to_owned();
+ static ref OWNED_STRING: String = "hello".to_string();
static ref HASHMAP: collections::HashMap<uint, &'static str> = {
let mut m = collections::HashMap::new();
m.insert(0u, "abc");
@@ -82,7 +82,7 @@ mod tests {
#[test]
fn test_basic() {
- assert_eq!(*OWNED_STRING, "hello".to_owned());
+ assert_eq!(*OWNED_STRING, "hello".to_string());
assert_eq!(*NUMBER, 6);
assert!(HASHMAP.find(&1).is_some());
assert!(HASHMAP.find(&3).is_none());