Skip to content

Commit fb06272

Browse files
committed
Rollup merge of #27903 - tshepang:improve-example, r=steveklabnik
2 parents 357ae03 + b667ff7 commit fb06272

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libcore/intrinsics.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,8 @@ extern "rust-intrinsic" {
247247
/// ```
248248
/// use std::mem;
249249
///
250-
/// let v: &[u8] = unsafe { mem::transmute("L") };
251-
/// assert!(v == [76]);
250+
/// let array: &[u8] = unsafe { mem::transmute("Rust") };
251+
/// assert_eq!(array, [82, 117, 115, 116]);
252252
/// ```
253253
#[stable(feature = "rust1", since = "1.0.0")]
254254
pub fn transmute<T,U>(e: T) -> U;

0 commit comments

Comments
 (0)