Skip to content

Commit aa529ef

Browse files
committed
Add missing keyword in extern crate declarations.
1 parent ef03055 commit aa529ef

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/librustc_resolve/diagnostics.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,17 @@ has been imported into the current module.
5353
5454
Wrong example:
5555
```
56-
extern a;
57-
extern crate_a as a;
56+
extern crate a;
57+
extern crate crate_a as a;
5858
```
5959
6060
The solution is to choose a different name that doesn't conflict with any
6161
external crate imported into the current module.
6262
6363
Correct example:
6464
```
65-
extern a;
66-
extern crate_a as other_name;
65+
extern crate a;
66+
extern crate crate_a as other_name;
6767
```
6868
"##,
6969

@@ -72,7 +72,7 @@ The name for an item declaration conflicts with an external crate's name.
7272
7373
For instance,
7474
```
75-
extern abc;
75+
extern crate abc;
7676
7777
struct abc;
7878
```
@@ -82,15 +82,15 @@ There are two possible solutions:
8282
Solution #1: Rename the item.
8383
8484
```
85-
extern abc;
85+
extern crate abc;
8686
8787
struct xyz;
8888
```
8989
9090
Solution #2: Import the crate with a different name.
9191
9292
```
93-
extern abc as xyz;
93+
extern crate abc as xyz;
9494
9595
struct abc;
9696
```

0 commit comments

Comments
 (0)