about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorSimonas Kazlauskas <git@kazlauskas.me>2015-08-25 01:44:18 +0300
committerSimonas Kazlauskas <git@kazlauskas.me>2015-08-25 01:44:18 +0300
commit067ad9928f75c647a2088bef57ca75b71c809792 (patch)
tree4fa85f52d0d833c42626105ff6724f4a3554fcae /src
parent2b45a0d90853deca584a28a55237d996a274a833 (diff)
downloadrust-067ad9928f75c647a2088bef57ca75b71c809792.tar.gz
rust-067ad9928f75c647a2088bef57ca75b71c809792.zip
Fix E0139 code
Fixes #27946
Diffstat (limited to 'src')
-rw-r--r--src/librustc/diagnostics.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/librustc/diagnostics.rs b/src/librustc/diagnostics.rs
index baa9750d311..2e4b40fbae9 100644
--- a/src/librustc/diagnostics.rs
+++ b/src/librustc/diagnostics.rs
@@ -831,9 +831,7 @@ is a size mismatch in one of the impls.
 It is also possible to manually transmute:
 
 ```
-let result: SomeType = mem::uninitialized();
-unsafe { copy_nonoverlapping(&v, &result) };
-result // `v` transmuted to type `SomeType`
+ptr::read(&v as *const _ as *const SomeType) // `v` transmuted to `SomeType`
 ```
 "##,