blob: 44383ed6eab28e245c5adac1ef2aa972a5cf1416 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
Attempt was made to import an item whereas an extern crate with this name has
already been imported.
Erroneous code example:
```compile_fail,E0254
extern crate core;
mod foo {
pub trait core {
fn do_something();
}
}
use foo::core; // error: an extern crate named `core` has already
// been imported in this module
fn main() {}
```
To fix this issue, you have to rename at least one of the two imports.
Example:
```
extern crate core as libcore; // ok!
mod foo {
pub trait core {
fn do_something();
}
}
use foo::core;
fn main() {}
```
|