Skip to content

Commit 90ebf93

Browse files
Greatly improve E0322 explanation
1 parent a6b5f87 commit 90ebf93

File tree

1 file changed

+10
-0
lines changed
  • src/librustc_error_codes/error_codes

1 file changed

+10
-0
lines changed

src/librustc_error_codes/error_codes/E0322.md

+10
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
The `Sized` trait was implemented explicitly.
2+
3+
Erroneous code example:
4+
5+
```compile_fail,E0322
6+
struct Foo;
7+
8+
impl Sized for Foo {} // error!
9+
```
10+
111
The `Sized` trait is a special trait built-in to the compiler for types with a
212
constant size known at compile-time. This trait is automatically implemented
313
for types as needed by the compiler, and it is currently disallowed to

0 commit comments

Comments
 (0)