Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
This commit is contained in:
Ralf Jung 2020-02-29 16:20:17 +01:00 committed by GitHub
parent 0edc90cd18
commit b6e847cc98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -882,7 +882,7 @@ extern "rust-intrinsic" {
/// let v_clone = v_orig.clone();
///
/// // Using transmute: this relies on the unspecified data layout of `Vec`, which is a
/// // bad idea and could cause Undefined Behavior
/// // bad idea and could cause Undefined Behavior.
/// // However, it is no-copy.
/// let v_transmuted = unsafe {
/// std::mem::transmute::<Vec<&i32>, Vec<Option<&i32>>>(v_clone)