]> git.lizzy.rs Git - rust.git/commitdiff
Clean up E0116 error code long explanation
authorGuillaume Gomez <guillaume1.gomez@gmail.com>
Wed, 4 Dec 2019 12:27:17 +0000 (13:27 +0100)
committerGuillaume Gomez <guillaume1.gomez@gmail.com>
Wed, 4 Dec 2019 12:32:37 +0000 (13:32 +0100)
src/librustc_error_codes/error_codes/E0116.md

index 27759a423433fa0eb50a47bc7c9497c28575a9a4..ca849c2a128f4776526f49542b1f01f9a1011984 100644 (file)
@@ -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