Skip to content

Commit 948754b

Browse files
committed
Fix the test for transmute
1 parent 6047dd3 commit 948754b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/libcore/cast.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,11 @@ pub mod tests {
130130

131131
#[test]
132132
pub fn test_transmute() {
133+
use managed::raw::BoxRepr;
133134
unsafe {
134-
let x = @1;
135-
let x: *int = transmute(move x);
136-
assert *x == 1;
135+
let x = @100u8;
136+
let x: *BoxRepr = transmute(move x);
137+
assert (*x).data == 100;
137138
let _x: @int = transmute(move x);
138139
}
139140
}

0 commit comments

Comments
 (0)