File tree 1 file changed +7
-7
lines changed
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -53,17 +53,17 @@ has been imported into the current module.
53
53
54
54
Wrong example:
55
55
```
56
- extern a;
57
- extern crate_a as a;
56
+ extern crate a;
57
+ extern crate crate_a as a;
58
58
```
59
59
60
60
The solution is to choose a different name that doesn't conflict with any
61
61
external crate imported into the current module.
62
62
63
63
Correct example:
64
64
```
65
- extern a;
66
- extern crate_a as other_name;
65
+ extern crate a;
66
+ extern crate crate_a as other_name;
67
67
```
68
68
"## ,
69
69
@@ -72,7 +72,7 @@ The name for an item declaration conflicts with an external crate's name.
72
72
73
73
For instance,
74
74
```
75
- extern abc;
75
+ extern crate abc;
76
76
77
77
struct abc;
78
78
```
@@ -82,15 +82,15 @@ There are two possible solutions:
82
82
Solution #1: Rename the item.
83
83
84
84
```
85
- extern abc;
85
+ extern crate abc;
86
86
87
87
struct xyz;
88
88
```
89
89
90
90
Solution #2: Import the crate with a different name.
91
91
92
92
```
93
- extern abc as xyz;
93
+ extern crate abc as xyz;
94
94
95
95
struct abc;
96
96
```
You can’t perform that action at this time.
0 commit comments