diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2019-12-04 13:31:40 +0100 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2019-12-04 13:32:37 +0100 |
| commit | 1e5450d4cb7bb951bbdb9bc2b09a984b132c4280 (patch) | |
| tree | 13a3a524e3a18f70732a0c87a9e7e2864c2c08e1 /src/librustc_error_codes/error_codes | |
| parent | c2ce7dd756c36cb619c7f231ab6596d6b180afed (diff) | |
| download | rust-1e5450d4cb7bb951bbdb9bc2b09a984b132c4280.tar.gz rust-1e5450d4cb7bb951bbdb9bc2b09a984b132c4280.zip | |
Clean up E0117 error code long explanation
Diffstat (limited to 'src/librustc_error_codes/error_codes')
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0117.md | 14 |
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 bd362305662..7fa211d4a27 100644 --- a/src/librustc_error_codes/error_codes/E0117.md +++ b/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 @@ -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`: |
