Replaced many instances of reinterpret_cast with transmute

This commit is contained in:
Matthijs Hofstra
2013-04-20 16:27:16 +02:00
parent f2b0ef147a
commit 51a68eb9b1
21 changed files with 107 additions and 109 deletions

View File

@@ -10,7 +10,7 @@
//! Unsafe debugging functions for inspecting values.
use core::cast::reinterpret_cast;
use core::cast::transmute;
use core::ptr;
use core::sys;
@@ -64,9 +64,9 @@ pub fn debug_fn<T>(x: T) {
}
pub unsafe fn ptr_cast<T, U>(x: @T) -> @U {
reinterpret_cast(
&rustrt::debug_ptrcast(sys::get_type_desc::<T>(),
reinterpret_cast(&x)))
transmute(
rustrt::debug_ptrcast(sys::get_type_desc::<T>(),
transmute(x)))
}
/// Triggers a debugger breakpoint