Skip to content

Commit da568ba

Browse files
committed
libcore: unsafe mod renamed to cast
1 parent 53abb5e commit da568ba

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/libcore/os.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ fn make_dir(p: &Path, mode: c_int) -> bool {
597597
use win32::*;
598598
// FIXME: turn mode into something useful? #2623
599599
do as_utf16_p(p.to_str()) |buf| {
600-
CreateDirectoryW(buf, unsafe { unsafe::reinterpret_cast(&0) })
600+
CreateDirectoryW(buf, unsafe { cast::reinterpret_cast(&0) })
601601
!= (0 as BOOL)
602602
}
603603
}

src/libcore/run.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,12 @@ fn with_envp<T>(env: &Option<~[(~str,~str)]>,
133133
for vec::each(es) |e| {
134134
let (k,v) = e;
135135
let t = fmt!("%s=%s", k, v);
136-
let mut v : ~[u8] = ::unsafe::reinterpret_cast(&t);
136+
let mut v : ~[u8] = ::cast::reinterpret_cast(&t);
137137
blk += v;
138-
::unsafe::forget(v);
138+
::cast::forget(v);
139139
}
140140
blk += ~[0_u8];
141-
vec::as_imm_buf(blk, |p, _len| cb(::unsafe::reinterpret_cast(&p)))
141+
vec::as_imm_buf(blk, |p, _len| cb(::cast::reinterpret_cast(&p)))
142142
}
143143
_ => cb(ptr::null())
144144
}

0 commit comments

Comments
 (0)