Skip to content

Commit c3dc769

Browse files
author
Nick Hamann
committed
Add error explanation for E0322.
1 parent 4fee8d3 commit c3dc769

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/librustc_typeck/diagnostics.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,13 @@ const B: [u32; foo()] = [];
481481
use std::{f64, u8};
482482
const C: [u32; u8::MAX + f64::EPSILON] = [];
483483
```
484+
"##,
485+
486+
E0322: r##"
487+
The `Sized` trait is a special trait built-in to the compiler for types with a
488+
constant size known at compile-time. This trait is automatically implemented
489+
for types as needed by the compiler, and it is currently disallowed to
490+
explicitly implement it for a type.
484491
"##
485492

486493
}
@@ -621,7 +628,6 @@ register_diagnostics! {
621628
E0319, // trait impls for defaulted traits allowed just for structs/enums
622629
E0320, // recursive overflow during dropck
623630
E0321, // extended coherence rules for defaulted traits violated
624-
E0322, // cannot implement Sized explicitly
625631
E0323, // implemented an associated const when another trait item expected
626632
E0324, // implemented a method when another trait item expected
627633
E0325, // implemented an associated type when another trait item expected

0 commit comments

Comments
 (0)