1
Fork 0

Improve transmute diagnostics with a note about destructors

fixes #29922
This commit is contained in:
Manish Goregaokar 2015-11-22 10:26:50 +05:30
parent 352853c18b
commit bef93557e5

View file

@ -858,6 +858,9 @@ It is also possible to manually transmute:
```
ptr::read(&v as *const _ as *const SomeType) // `v` transmuted to `SomeType`
```
Note that this does not move `v` (unlike `transmute`), and may need a
call to `mem::forget(v)` in case you want to avoid destructors being called.
"##,
E0152: r##"