about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2020-02-20 14:26:56 +0100
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2020-02-20 14:26:56 +0100
commit90ebf93bdfe2acdaeb504a24dea27fbfd74e3218 (patch)
tree2855e7b808881a17765b2804301976c956b1aa6e /src
parenta6b5f875c1cb3a77200c6f3da3d7df0601f90173 (diff)
downloadrust-90ebf93bdfe2acdaeb504a24dea27fbfd74e3218.tar.gz
rust-90ebf93bdfe2acdaeb504a24dea27fbfd74e3218.zip
Greatly improve E0322 explanation
Diffstat (limited to 'src')
-rw-r--r--src/librustc_error_codes/error_codes/E0322.md10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/librustc_error_codes/error_codes/E0322.md b/src/librustc_error_codes/error_codes/E0322.md
index d2ee426763e..ccef8681dd6 100644
--- a/src/librustc_error_codes/error_codes/E0322.md
+++ b/src/librustc_error_codes/error_codes/E0322.md
@@ -1,3 +1,13 @@
+The `Sized` trait was implemented explicitly.
+
+Erroneous code example:
+
+```compile_fail,E0322
+struct Foo;
+
+impl Sized for Foo {} // error!
+```
+
 The `Sized` trait is a special trait built-in to the compiler for types with a
 constant size known at compile-time. This trait is automatically implemented
 for types as needed by the compiler, and it is currently disallowed to