blob: 628f5e252fbb606d94d1702ed61aa6d3d43bab02 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#### Note: this error code is no longer emitted by the compiler.
Attempt was made to import an unimportable type. This can happen when trying
to import a type from a trait.
Erroneous code example:
```
#![feature(import_trait_associated_functions)]
mod foo {
pub trait MyTrait {
type SomeType;
}
}
use foo::MyTrait::SomeType;
// error: `SomeType` is not directly importable
fn main() {}
```
It's invalid to directly import types belonging to a trait.
|