mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-17 05:25:37 +03:00
Greatly improve E0322 explanation
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user