Skip to content

Commit

Permalink
Greatly improve E0322 explanation
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Feb 20, 2020
1 parent a6b5f87 commit 90ebf93
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/librustc_error_codes/error_codes/E0322.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 90ebf93

Please sign in to comment.