Skip to content

Commit 9721732

Browse files
committed
doc: Fix transmute example
1 parent 5003f60 commit 9721732

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/libstd/cast.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,10 @@ pub unsafe fn bump_box_refcount<T>(t: @T) { forget(t); }
6666
*
6767
* # Example
6868
*
69-
* assert!(transmute("L") == ~[76u8, 0u8]);
69+
* ~~~ {.rust}
70+
* let v: &[u8] = transmute("L");
71+
* assert!(v == [76u8]);
72+
* ~~~
7073
*/
7174
#[inline]
7275
pub unsafe fn transmute<L, G>(thing: L) -> G {

0 commit comments

Comments
 (0)