diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2019-12-04 13:27:17 +0100 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2019-12-04 13:32:37 +0100 |
| commit | c2ce7dd756c36cb619c7f231ab6596d6b180afed (patch) | |
| tree | be459c648df8b4bebebdf5931a837919805e3159 | |
| parent | 5f1d6c44034ac143f7a3e56ae7ea8858dcbb61ca (diff) | |
| download | rust-c2ce7dd756c36cb619c7f231ab6596d6b180afed.tar.gz rust-c2ce7dd756c36cb619c7f231ab6596d6b180afed.zip | |
Clean up E0116 error code long explanation
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0116.md | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/librustc_error_codes/error_codes/E0116.md b/src/librustc_error_codes/error_codes/E0116.md index 27759a42343..ca849c2a128 100644 --- a/src/librustc_error_codes/error_codes/E0116.md +++ b/src/librustc_error_codes/error_codes/E0116.md @@ -1,11 +1,15 @@ -You can only define an inherent implementation for a type in the same crate -where the type was defined. For example, an `impl` block as below is not allowed -since `Vec` is defined in the standard library: +An inherent implementation was defined for a type outside the current crate. + +Erroneous code example: ```compile_fail,E0116 impl Vec<u8> { } // error ``` +You can only define an inherent implementation for a type in the same crate +where the type was defined. For example, an `impl` block as above is not allowed +since `Vec` is defined in the standard library. + To fix this problem, you can do either of these things: - define a trait that has the desired associated functions/types/constants and |
