Skip to content

Commit 3d18097

Browse files
committed
---
yaml --- r: 6387 b: refs/heads/master c: 44aebb9 h: refs/heads/master i: 6385: f393d7b 6383: f3d7655 v: v3
1 parent 8cce53a commit 3d18097

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-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: 9ca20059595a654a03fdc55a63aa2cefa3ad9708
2+
refs/heads/master: 44aebb978ca146dad99068412f44aa11c379dc12

trunk/src/test/stdtest/stdtest.rc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ mod task;
3434
mod test;
3535
mod treemap;
3636
mod uint;
37+
mod unsafe;
3738
mod vec;
3839

3940
// Local Variables:

trunk/src/test/stdtest/unsafe.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import std::unsafe;
2+
3+
#[test]
4+
fn reinterpret_cast() unsafe {
5+
assert unsafe::reinterpret_cast(1) == 1u;
6+
}
7+
8+
#[test]
9+
#[should_fail]
10+
#[ignore(cfg(target_os = "win32"))]
11+
fn reinterpret_cast_wrong_size() unsafe {
12+
let _i: uint = unsafe::reinterpret_cast(0u8);
13+
}

0 commit comments

Comments
 (0)