Rollup merge of #69311 - GuillaumeGomez:clean-up-e0321-e0322, r=Dylan-DPC

Clean up E0321 and E0322

r? @Dylan-DPC
This commit is contained in:
Mazdak Farrokhzad 2020-02-20 20:18:53 +01:00 committed by GitHub
commit 362f6501f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 1 deletions

View File

@ -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)]

View File

@ -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