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+
19This error indicates a violation of one of Rust's orphan rules for trait
210implementations. The rule prohibits any implementation of a foreign trait (a
311trait 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-
1517To avoid this kind of error, ensure that at least one local type is referenced
1618by the ` impl ` :
1719
You can’t perform that action at this time.
0 commit comments