We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2b45a0d commit 067ad99Copy full SHA for 067ad99
src/librustc/diagnostics.rs
@@ -831,9 +831,7 @@ is a size mismatch in one of the impls.
831
It is also possible to manually transmute:
832
833
```
834
-let result: SomeType = mem::uninitialized();
835
-unsafe { copy_nonoverlapping(&v, &result) };
836
-result // `v` transmuted to type `SomeType`
+ptr::read(&v as *const _ as *const SomeType) // `v` transmuted to `SomeType`
837
838
"##,
839
0 commit comments