about summary refs log tree commit diff
path: root/src/librustc_error_codes/error_codes
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2019-11-15 13:15:05 +0100
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2019-11-15 13:24:47 +0100
commitcab1955b216f2b84c6129a0b734c89419f565b4a (patch)
treeaa7a11560dca6f881faab2361cc9d27072c31be3 /src/librustc_error_codes/error_codes
parentf8d575a0073300cd9cc3f204bc3c21b86eb5ec18 (diff)
Clean up E0033
Diffstat (limited to 'src/librustc_error_codes/error_codes')
-rw-r--r--src/librustc_error_codes/error_codes/E0033.md16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/librustc_error_codes/error_codes/E0033.md b/src/librustc_error_codes/error_codes/E0033.md
index 0bb70e89f3d..c49cedf2d58 100644
--- a/src/librustc_error_codes/error_codes/E0033.md
+++ b/src/librustc_error_codes/error_codes/E0033.md
@@ -1,8 +1,6 @@
-This error indicates that a pointer to a trait type cannot be implicitly
-dereferenced by a pattern. Every trait defines a type, but because the
-size of trait implementers isn't fixed, this type has no compile-time size.
-Therefore, all accesses to trait types must be through pointers. If you
-encounter this error you should try to avoid dereferencing the pointer.
+A trait type has been dereferenced.
+
+Erroneous code example:
 
 ```compile_fail,E0033
 # trait SomeTrait { fn method_one(&self){} fn method_two(&self){} }
@@ -17,7 +15,13 @@ trait_obj.method_one();
 trait_obj.method_two();
 ```
 
+A pointer to a trait type cannot be implicitly dereferenced by a pattern. Every
+trait defines a type, but because the size of trait implementers isn't fixed,
+this type has no compile-time size. Therefore, all accesses to trait types must
+be through pointers. If you encounter this error you should try to avoid
+dereferencing the pointer.
+
 You can read more about trait objects in the [Trait Objects] section of the
 Reference.
 
-[Trait Objects]: https://doc.rust-lang.org/reference/types.html#trait-objects
+[Trait Objects]: https://doc.rust-lang.org/reference/types.html#trait-objects
\ No newline at end of file