Skip to content

Commit 04b929b

Browse files
committed
---
yaml --- r: 3777 b: refs/heads/master c: 91dcc1d h: refs/heads/master i: 3775: e6b9cca v: v3
1 parent 0026bd0 commit 04b929b

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 7efb9426394ce5854b906bd3d7394bfc2228a9d0
2+
refs/heads/master: 91dcc1d054cdf86582bad6b6d343761041a1f5de

trunk/src/lib/unsafe.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Unsafe operations.
2+
3+
native "rust-intrinsic" mod rusti {
4+
fn cast[T,U](&T src) -> U;
5+
}
6+
7+
// Casts the value at `src` to U. The two types must have the same length.
8+
fn reinterpret_cast[T,U](&T src) -> U { ret rusti::cast(src); }
9+

0 commit comments

Comments
 (0)