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
+1 -1
View File
@@ -882,7 +882,7 @@
/// 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)