Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add missing keyword in extern crate declarations.
  • Loading branch information
meqif committed May 11, 2015
commit aa529ef52e54039fcfaa8aa7914be4c581179497
14 changes: 7 additions & 7 deletions src/librustc_resolve/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,17 @@ has been imported into the current module.

Wrong example:
```
extern a;
extern crate_a as a;
extern crate a;
extern crate crate_a as a;
```

The solution is to choose a different name that doesn't conflict with any
external crate imported into the current module.

Correct example:
```
extern a;
extern crate_a as other_name;
extern crate a;
extern crate crate_a as other_name;
```
"##,

Expand All @@ -72,7 +72,7 @@ The name for an item declaration conflicts with an external crate's name.

For instance,
```
extern abc;
extern crate abc;

struct abc;
```
Expand All @@ -82,15 +82,15 @@ There are two possible solutions:
Solution #1: Rename the item.

```
extern abc;
extern crate abc;

struct xyz;
```

Solution #2: Import the crate with a different name.

```
extern abc as xyz;
extern crate abc as xyz;

struct abc;
```
Expand Down