Add extended error message for E0523
Adds the extended error documentation for E0523 to indicate that the error is no longer produced by the compiler. Update the E0464 documentation to include example code that produces the error. Remove the error message E0523 from the compiler and replace it with an internal compiler error.
This commit is contained in:
@@ -1,6 +1,21 @@
|
||||
The compiler found multiple library files with the requested crate name.
|
||||
|
||||
```compile_fail
|
||||
// aux-build:crateresolve-1.rs
|
||||
// aux-build:crateresolve-2.rs
|
||||
// aux-build:crateresolve-3.rs
|
||||
|
||||
extern crate crateresolve;
|
||||
//~^ ERROR multiple candidates for `rlib` dependency `crateresolve` found
|
||||
|
||||
fn main() {}
|
||||
```
|
||||
|
||||
This error can occur in several different cases -- for example, when using
|
||||
`extern crate` or passing `--extern` options without crate paths. It can also be
|
||||
caused by caching issues with the build directory, in which case `cargo clean`
|
||||
may help.
|
||||
|
||||
In the above example, there are three different library files, all of which
|
||||
define the same crate name. Without providing a full path, there is no way for
|
||||
the compiler to know which crate it should use.
|
||||
|
||||
25
compiler/rustc_error_codes/src/error_codes/E0523.md
Normal file
25
compiler/rustc_error_codes/src/error_codes/E0523.md
Normal file
@@ -0,0 +1,25 @@
|
||||
#### Note: this error code is no longer emitted by the compiler.
|
||||
|
||||
The compiler found multiple library files with the requested crate name.
|
||||
|
||||
```compile_fail
|
||||
// aux-build:crateresolve-1.rs
|
||||
// aux-build:crateresolve-2.rs
|
||||
// aux-build:crateresolve-3.rs
|
||||
|
||||
extern crate crateresolve;
|
||||
//~^ ERROR multiple candidates for `rlib` dependency `crateresolve` found
|
||||
|
||||
fn main() {}
|
||||
```
|
||||
|
||||
This error can occur in several different cases -- for example, when using
|
||||
`extern crate` or passing `--extern` options without crate paths. It can also be
|
||||
caused by caching issues with the build directory, in which case `cargo clean`
|
||||
may help.
|
||||
|
||||
In the above example, there are three different library files, all of which
|
||||
define the same crate name. Without providing a full path, there is no way for
|
||||
the compiler to know which crate it should use.
|
||||
|
||||
*Note that E0523 has been merged into E0464.*
|
||||
Reference in New Issue
Block a user