Skip to content

Commit c4847a1

Browse files
committed
Rollup merge of #27988 - nagisa:diags-e0139, r=brson
Fixes #27946
2 parents d9de182 + 067ad99 commit c4847a1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/librustc/diagnostics.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -836,9 +836,7 @@ is a size mismatch in one of the impls.
836836
It is also possible to manually transmute:
837837
838838
```
839-
let result: SomeType = mem::uninitialized();
840-
unsafe { copy_nonoverlapping(&v, &result) };
841-
result // `v` transmuted to type `SomeType`
839+
ptr::read(&v as *const _ as *const SomeType) // `v` transmuted to `SomeType`
842840
```
843841
"##,
844842

0 commit comments

Comments
 (0)