stdlib: Add missing unsafe.rs. Puts out burning tinderbox.
This commit is contained in:
parent
7efb942639
commit
91dcc1d054
1 changed files with 9 additions and 0 deletions
9
src/lib/unsafe.rs
Normal file
9
src/lib/unsafe.rs
Normal file
|
@ -0,0 +1,9 @@
|
|||
// Unsafe operations.
|
||||
|
||||
native "rust-intrinsic" mod rusti {
|
||||
fn cast[T,U](&T src) -> U;
|
||||
}
|
||||
|
||||
// Casts the value at `src` to U. The two types must have the same length.
|
||||
fn reinterpret_cast[T,U](&T src) -> U { ret rusti::cast(src); }
|
||||
|
Loading…
Reference in a new issue