summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2019-12-04 13:31:40 +0100
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2019-12-04 13:32:37 +0100
commit1e5450d4cb7bb951bbdb9bc2b09a984b132c4280 (patch)
tree13a3a524e3a18f70732a0c87a9e7e2864c2c08e1
parentClean up E0116 error code long explanation (diff)
downloadrust-1e5450d4cb7bb951bbdb9bc2b09a984b132c4280.tar.gz
rust-1e5450d4cb7bb951bbdb9bc2b09a984b132c4280.tar.bz2
rust-1e5450d4cb7bb951bbdb9bc2b09a984b132c4280.tar.xz
Clean up E0117 error code long explanation
-rw-r--r--src/librustc_error_codes/error_codes/E0117.md14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/librustc_error_codes/error_codes/E0117.md b/src/librustc_error_codes/error_codes/E0117.md
index bd36230..7fa211d 100644
--- a/src/librustc_error_codes/error_codes/E0117.md
+++ b/src/librustc_error_codes/error_codes/E0117.md
@@ -1,3 +1,11 @@
1The `Drop` trait was implemented on a non-struct type.
2
3Erroneous code example:
4
5```compile_fail,E0117
6impl Drop for u32 {}
7```
8
1This error indicates a violation of one of Rust's orphan rules for trait 9This error indicates a violation of one of Rust's orphan rules for trait
2implementations. The rule prohibits any implementation of a foreign trait (a 10implementations. The rule prohibits any implementation of a foreign trait (a
3trait defined in another crate) where 11trait defined in another crate) where
@@ -6,12 +14,6 @@ trait defined in another crate) where
6 - all of the parameters being passed to the trait (if there are any) are also 14 - all of the parameters being passed to the trait (if there are any) are also
7 foreign. 15 foreign.
8 16
9Here's one example of this error:
10
11```compile_fail,E0117
12impl Drop for u32 {}
13```
14
15To avoid this kind of error, ensure that at least one local type is referenced 17To avoid this kind of error, ensure that at least one local type is referenced
16by the `impl`: 18by the `impl`:
17 19