Clean up E0117 error code long explanation

This commit is contained in:
Guillaume Gomez 2019-12-04 13:31:40 +01:00
parent c2ce7dd756
commit 1e5450d4cb

View file

@ -1,3 +1,11 @@
The `Drop` trait was implemented on a non-struct type.
Erroneous code example:
```compile_fail,E0117
impl Drop for u32 {}
```
This error indicates a violation of one of Rust's orphan rules for trait
implementations. The rule prohibits any implementation of a foreign trait (a
trait defined in another crate) where
@ -6,12 +14,6 @@ trait defined in another crate) where
- all of the parameters being passed to the trait (if there are any) are also
foreign.
Here's one example of this error:
```compile_fail,E0117
impl Drop for u32 {}
```
To avoid this kind of error, ensure that at least one local type is referenced
by the `impl`: