about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2015-08-17 14:30:38 +0200
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2015-08-17 14:30:38 +0200
commit73685afb8a76148d25d17ea80d0eb26a48839f9b (patch)
tree3b4513de0ccfc4fbbd40c586e45ef43f529f712f /src
parent768111fa93ec801735f30a38c5fd2ef4774a9d3a (diff)
downloadrust-73685afb8a76148d25d17ea80d0eb26a48839f9b.tar.gz
rust-73685afb8a76148d25d17ea80d0eb26a48839f9b.zip
Add E0390 error explanation
Diffstat (limited to 'src')
-rw-r--r--src/librustc_typeck/diagnostics.rs18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/librustc_typeck/diagnostics.rs b/src/librustc_typeck/diagnostics.rs
index aab2625fc25..bf2324ab232 100644
--- a/src/librustc_typeck/diagnostics.rs
+++ b/src/librustc_typeck/diagnostics.rs
@@ -2774,6 +2774,22 @@ For more information see the [opt-in builtin traits RFC](https://github.com/rust
 -lang/rfcs/blob/master/text/0019-opt-in-builtin-traits.md).
 "##,
 
+E0390: r##"
+You tried to implement on an `*mut T` type. Erroneous code example:
+
+```
+struct Foo {
+    x: i32
+}
+
+impl *mut Foo {}
+// error: only a single inherent implementation marked with
+//        `#[lang = "mut_ptr"]` is allowed for the `*mut T` primitive
+```
+
+To fix this, please follow the compiler recommendations.
+"##,
+
 E0391: r##"
 This error indicates that some types or traits depend on each other
 and therefore cannot be constructed.
@@ -2928,8 +2944,6 @@ register_diagnostics! {
            // between structures
     E0377, // the trait `CoerceUnsized` may only be implemented for a coercion
            // between structures with the same definition
-    E0390, // only a single inherent implementation marked with
-           // `#[lang = \"{}\"]` is allowed for the `{}` primitive
     E0393, // the type parameter `{}` must be explicitly specified in an object
            // type because its default value `{}` references the type `Self`"
     E0399, // trait items need to be implemented because the associated