]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_error_codes/src/error_codes/E0322.md
Rollup merge of #107086 - clubby789:bootstrap-lock-pid-linux, r=albertlarsan68
[rust.git] / compiler / rustc_error_codes / src / error_codes / E0322.md
1 A built-in trait was implemented explicitly. All implementations of the trait
2 are provided automatically by the compiler.
3
4 Erroneous code example:
5
6 ```compile_fail,E0322
7 struct Foo;
8
9 impl Sized for Foo {} // error!
10 ```
11
12 The `Sized` trait is a special trait built-in to the compiler for types with a
13 constant size known at compile-time. This trait is automatically implemented
14 for types as needed by the compiler, and it is currently disallowed to
15 explicitly implement it for a type.