From 948754b572efd8c1b94875cee4210bd8770c95fb Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Wed, 12 Dec 2012 18:41:30 -0800 Subject: [PATCH] Fix the test for transmute --- src/libcore/cast.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/libcore/cast.rs b/src/libcore/cast.rs index 46ac2824efb..4ae89191545 100644 --- a/src/libcore/cast.rs +++ b/src/libcore/cast.rs @@ -130,10 +130,11 @@ pub mod tests { #[test] pub fn test_transmute() { + use managed::raw::BoxRepr; unsafe { - let x = @1; - let x: *int = transmute(move x); - assert *x == 1; + let x = @100u8; + let x: *BoxRepr = transmute(move x); + assert (*x).data == 100; let _x: @int = transmute(move x); } }