Skip to content

Commit cb87ea8

Browse files
committed
Auto merge of rust-lang#27111 - AlisdairO:diagnostics253, r=Manishearth
As per topic :-). Part of rust-lang#24407. r? @Manishearth
2 parents 3b8acb7 + 4ea02b7 commit cb87ea8

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

src/librustc_resolve/diagnostics.rs

+17-1
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,23 @@ mod bar {
9393
```
9494
"##,
9595

96+
E0253: r##"
97+
Attempt was made to import an unimportable value. This can happen when
98+
trying to import a method from a trait. An example of this error:
99+
100+
```
101+
mod foo {
102+
pub trait MyTrait {
103+
fn do_something();
104+
}
105+
}
106+
use foo::MyTrait::do_something;
107+
```
108+
109+
In general, it's not legal to directly import methods belonging to a
110+
trait or concrete type.
111+
"##,
112+
96113
E0255: r##"
97114
You can't import a value whose name is the same as another value defined in the
98115
module.
@@ -262,7 +279,6 @@ http://doc.rust-lang.org/reference.html#use-declarations
262279
register_diagnostics! {
263280
E0153, // called no where
264281
E0157, // called from no where
265-
E0253, // not directly importable
266282
E0254, // import conflicts with imported crate in this module
267283
E0257,
268284
E0258,

0 commit comments

Comments
 (0)