about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorRicardo Martins <ricardo@scarybox.net>2015-05-10 12:09:41 +0100
committerRicardo Martins <ricardo@scarybox.net>2015-05-10 12:27:06 +0100
commite7fa00a3e24f094012f878945bef8a62df1678c1 (patch)
treee405ef204b8f234c1fb2c2f93fa823a95c818078 /src
parentf3a3684614c0baf01e2d22e662b67e6a1408b718 (diff)
downloadrust-e7fa00a3e24f094012f878945bef8a62df1678c1.tar.gz
rust-e7fa00a3e24f094012f878945bef8a62df1678c1.zip
Add error explanation for E0259.
Diffstat (limited to 'src')
-rw-r--r--src/librustc_resolve/diagnostics.rs21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/librustc_resolve/diagnostics.rs b/src/librustc_resolve/diagnostics.rs
index 4b754913bd9..47f9b024fd0 100644
--- a/src/librustc_resolve/diagnostics.rs
+++ b/src/librustc_resolve/diagnostics.rs
@@ -47,6 +47,26 @@ about what constitutes an Item declaration and what does not:
 http://doc.rust-lang.org/reference.html#statements
 "##,
 
+E0259: r##"
+The name chosen for an external crate conflicts with another external crate that
+has been imported into the current module.
+
+Wrong example:
+```
+extern a;
+extern crate_a as a;
+```
+
+The solution is to choose a different name that doesn't conflict with any
+external crate imported into the current module.
+
+Correct example:
+```
+extern a;
+extern crate_a as other_name;
+```
+"##,
+
 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
@@ -71,7 +91,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
-    E0259, // an extern crate has already been imported into this module
     E0260, // name conflicts with an external crate that has been imported into this module
     E0364, // item is private
     E0365  // item is private