Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Clean up E0117 error code long explanation
  • Loading branch information
GuillaumeGomez committed Dec 4, 2019
1 parent c2ce7dd commit 1e5450d
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/librustc_error_codes/error_codes/E0117.md
@@ -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
Expand All @@ -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`:

Expand Down

0 comments on commit 1e5450d

Please sign in to comment.