Skip to content

Commit 1e5450d

Browse files
Clean up E0117 error code long explanation
1 parent c2ce7dd commit 1e5450d

File tree

1 file changed

+8
-6
lines changed
  • src/librustc_error_codes/error_codes

1 file changed

+8
-6
lines changed

src/librustc_error_codes/error_codes/E0117.md

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
The `Drop` trait was implemented on a non-struct type.
2+
3+
Erroneous code example:
4+
5+
```compile_fail,E0117
6+
impl Drop for u32 {}
7+
```
8+
19
This error indicates a violation of one of Rust's orphan rules for trait
210
implementations. The rule prohibits any implementation of a foreign trait (a
311
trait defined in another crate) where
@@ -6,12 +14,6 @@ trait defined in another crate) where
614
- all of the parameters being passed to the trait (if there are any) are also
715
foreign.
816

9-
Here's one example of this error:
10-
11-
```compile_fail,E0117
12-
impl Drop for u32 {}
13-
```
14-
1517
To avoid this kind of error, ensure that at least one local type is referenced
1618
by the `impl`:
1719

0 commit comments

Comments
 (0)