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.
2 parents d9de182 + 067ad99 commit c4847a1Copy full SHA for c4847a1
src/librustc/diagnostics.rs
@@ -836,9 +836,7 @@ is a size mismatch in one of the impls.
836
It is also possible to manually transmute:
837
838
```
839
-let result: SomeType = mem::uninitialized();
840
-unsafe { copy_nonoverlapping(&v, &result) };
841
-result // `v` transmuted to type `SomeType`
+ptr::read(&v as *const _ as *const SomeType) // `v` transmuted to `SomeType`
842
843
"##,
844
0 commit comments