about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-07-19 14:06:22 +0000
committerbors <bors@rust-lang.org>2015-07-19 14:06:22 +0000
commitcb87ea80a6f3411c889f9a48b65724b32659c171 (patch)
treea9ce7b8ab2326fcbc236db39c3f0f7ed1182df40
parent3b8acb73869a6a0224cb39d16f2de25468e1bf28 (diff)
parent4ea02b72b77a7d077e6a249564314c39a597ded0 (diff)
downloadrust-cb87ea80a6f3411c889f9a48b65724b32659c171.tar.gz
rust-cb87ea80a6f3411c889f9a48b65724b32659c171.zip
Auto merge of #27111 - AlisdairO:diagnostics253, r=Manishearth
As per topic :-).

Part of #24407.
r? @Manishearth 
-rw-r--r--src/librustc_resolve/diagnostics.rs18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/librustc_resolve/diagnostics.rs b/src/librustc_resolve/diagnostics.rs
index c7125c38aa9..40a298f4764 100644
--- a/src/librustc_resolve/diagnostics.rs
+++ b/src/librustc_resolve/diagnostics.rs
@@ -93,6 +93,23 @@ mod bar {
 ```
 "##,
 
+E0253: r##"
+Attempt was made to import an unimportable value. This can happen when
+trying to import a method from a trait. An example of this error:
+
+```
+mod foo {
+    pub trait MyTrait {
+        fn do_something();
+    }
+}
+use foo::MyTrait::do_something;
+```
+
+In general, it's not legal to directly import methods belonging to a
+trait or concrete type.
+"##,
+
 E0255: r##"
 You can't import a value whose name is the same as another value defined in the
 module.
@@ -262,7 +279,6 @@ http://doc.rust-lang.org/reference.html#use-declarations
 register_diagnostics! {
     E0153, // called no where
     E0157, // called from no where
-    E0253, // not directly importable
     E0254, // import conflicts with imported crate in this module
     E0257,
     E0258,