Skip to content

Commit 362f650

Browse files
authored
Rollup merge of rust-lang#69311 - GuillaumeGomez:clean-up-e0321-e0322, r=Dylan-DPC
Clean up E0321 and E0322 r? @Dylan-DPC
2 parents 1facbb8 + 90ebf93 commit 362f650

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

src/librustc_error_codes/error_codes/E0321.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
A cross-crate opt-out trait was implemented on something which wasn't a struct
2-
or enum type. Erroneous code example:
2+
or enum type.
3+
4+
Erroneous code example:
35

46
```compile_fail,E0321
57
#![feature(optin_builtin_traits)]

src/librustc_error_codes/error_codes/E0322.md

Lines changed: 10 additions & 0 deletions
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)