Clean up E0117 error code long explanation
This commit is contained in:
parent
c2ce7dd756
commit
1e5450d4cb
1 changed files with 8 additions and 6 deletions
|
|
@ -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`:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue