Skip to content

Commit

Permalink
Rollup merge of #69311 - GuillaumeGomez:clean-up-e0321-e0322, r=Dylan…
Browse files Browse the repository at this point in the history
…-DPC

Clean up E0321 and E0322

r? @Dylan-DPC
  • Loading branch information
Centril authored Feb 20, 2020
2 parents 1facbb8 + 90ebf93 commit 362f650
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/librustc_error_codes/error_codes/E0321.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
A cross-crate opt-out trait was implemented on something which wasn't a struct
or enum type. Erroneous code example:
or enum type.

Erroneous code example:

```compile_fail,E0321
#![feature(optin_builtin_traits)]
Expand Down
10 changes: 10 additions & 0 deletions src/librustc_error_codes/error_codes/E0322.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 362f650

Please sign in to comment.