We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0026bd0 commit 04b929bCopy full SHA for 04b929b
[refs]
@@ -1,2 +1,2 @@
1
---
2
-refs/heads/master: 7efb9426394ce5854b906bd3d7394bfc2228a9d0
+refs/heads/master: 91dcc1d054cdf86582bad6b6d343761041a1f5de
trunk/src/lib/unsafe.rs
@@ -0,0 +1,9 @@
+// Unsafe operations.
+
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