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
Next Next commit
Add error explanation for E0259.
  • Loading branch information
meqif committed May 10, 2015
commit e7fa00a3e24f094012f878945bef8a62df1678c1
21 changes: 20 additions & 1 deletion src/librustc_resolve/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,26 @@ about what constitutes an Item declaration and what does not:
http://doc.rust-lang.org/reference.html#statements
"##,

E0259: r##"
The name chosen for an external crate conflicts with another external crate that
has been imported into the current module.

Wrong example:
```
extern a;
extern 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;
```
"##,

E0317: r##"
User-defined types or type parameters cannot shadow the primitive types.
This error indicates you tried to define a type, struct or enum with the same
Expand All @@ -71,7 +91,6 @@ register_diagnostics! {
E0256, // import conflicts with type in this module
E0257, // inherent implementations are only allowed on types defined in the current module
E0258, // import conflicts with existing submodule
E0259, // an extern crate has already been imported into this module
E0260, // name conflicts with an external crate that has been imported into this module
E0364, // item is private
E0365 // item is private
Expand Down