diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2020-02-20 14:26:56 +0100 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2020-02-20 14:26:56 +0100 |
| commit | 90ebf93bdfe2acdaeb504a24dea27fbfd74e3218 (patch) | |
| tree | 2855e7b808881a17765b2804301976c956b1aa6e /src | |
| parent | a6b5f875c1cb3a77200c6f3da3d7df0601f90173 (diff) | |
| download | rust-90ebf93bdfe2acdaeb504a24dea27fbfd74e3218.tar.gz rust-90ebf93bdfe2acdaeb504a24dea27fbfd74e3218.zip | |
Greatly improve E0322 explanation
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0322.md | 10 |
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 |
