diff options
| author | Keegan McAllister <kmcallister@mozilla.com> | 2013-08-22 12:06:41 -0700 |
|---|---|---|
| committer | Keegan McAllister <kmcallister@mozilla.com> | 2013-08-22 12:06:41 -0700 |
| commit | 9721732976926d7b3476136ffee68e2f43fb604a (patch) | |
| tree | fea7229461849efde5e834110d5042b3d6eba7d5 /src/libstd | |
| parent | 5003f607ec7386ba9a150e1bafb7d389de62d9ff (diff) | |
| download | rust-9721732976926d7b3476136ffee68e2f43fb604a.tar.gz rust-9721732976926d7b3476136ffee68e2f43fb604a.zip | |
doc: Fix transmute example
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/cast.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libstd/cast.rs b/src/libstd/cast.rs index 9d1d6e65901..825d0147c80 100644 --- a/src/libstd/cast.rs +++ b/src/libstd/cast.rs @@ -66,7 +66,10 @@ pub unsafe fn bump_box_refcount<T>(t: @T) { forget(t); } * * # Example * - * assert!(transmute("L") == ~[76u8, 0u8]); + * ~~~ {.rust} + * let v: &[u8] = transmute("L"); + * assert!(v == [76u8]); + * ~~~ */ #[inline] pub unsafe fn transmute<L, G>(thing: L) -> G { |
