File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
src/librustc_error_codes/error_codes Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change
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
+
1
9
This error indicates a violation of one of Rust's orphan rules for trait
2
10
implementations. The rule prohibits any implementation of a foreign trait (a
3
11
trait defined in another crate) where
@@ -6,12 +14,6 @@ trait defined in another crate) where
6
14
- all of the parameters being passed to the trait (if there are any) are also
7
15
foreign.
8
16
9
- Here's one example of this error:
10
-
11
- ``` compile_fail,E0117
12
- impl Drop for u32 {}
13
- ```
14
-
15
17
To avoid this kind of error, ensure that at least one local type is referenced
16
18
by the ` impl ` :
17
19
You can’t perform that action at this time.
0 commit comments