about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRicardo Martins <ricardo@scarybox.net>2015-05-10 12:26:19 +0100
committerRicardo Martins <ricardo@scarybox.net>2015-05-10 12:27:06 +0100
commit60ec4ab220385be1ad2aef237733d7f38c2196b3 (patch)
treea211ba4015e8be32f184df1fe5b07f5cdc23848c
parente7fa00a3e24f094012f878945bef8a62df1678c1 (diff)
downloadrust-60ec4ab220385be1ad2aef237733d7f38c2196b3.tar.gz
rust-60ec4ab220385be1ad2aef237733d7f38c2196b3.zip
Add error explanation for E0260.
-rw-r--r--src/librustc_resolve/diagnostics.rs35
1 files changed, 34 insertions, 1 deletions
diff --git a/src/librustc_resolve/diagnostics.rs b/src/librustc_resolve/diagnostics.rs
index 47f9b024fd0..5f0b5af9a05 100644
--- a/src/librustc_resolve/diagnostics.rs
+++ b/src/librustc_resolve/diagnostics.rs
@@ -67,6 +67,40 @@ extern crate_a as other_name;
 ```
 "##,
 
+E0260: r##"
+The name for an item declaration conflicts with an external crate's name.
+
+For instance,
+```
+extern abc;
+
+struct abc;
+```
+
+There are two possible solutions:
+
+Solution #1: Rename the item.
+
+```
+extern abc;
+
+struct xyz;
+```
+
+Solution #2: Import the crate with a different name.
+
+```
+extern abc as xyz;
+
+struct abc;
+```
+
+See the Declaration Statements section of the reference for more information
+about what constitutes an Item declaration and what does not:
+
+http://doc.rust-lang.org/reference.html#statements
+"##,
+
 E0317: r##"
 User-defined types or type parameters cannot shadow the primitive types.
 This error indicates you tried to define a type, struct or enum with the same
@@ -91,7 +125,6 @@ register_diagnostics! {
     E0256, // import conflicts with type in this module
     E0257, // inherent implementations are only allowed on types defined in the current module
     E0258, // import conflicts with existing submodule
-    E0260, // name conflicts with an external crate that has been imported into this module
     E0364, // item is private
     E0365  // item is private
 }