]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_error_codes/src/error_codes/E0322.md
Rollup merge of #93556 - dtolnay:trailingcomma, r=cjgillot
[rust.git] / compiler / rustc_error_codes / src / error_codes / E0322.md
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
11 The `Sized` trait is a special trait built-in to the compiler for types with a
12 constant size known at compile-time. This trait is automatically implemented
13 for types as needed by the compiler, and it is currently disallowed to
14 explicitly implement it for a type.