docs/test: add UI test and long-form error docs for E0519
This commit is contained in:
parent
270c94e484
commit
da7fcc7a09
5 changed files with 60 additions and 3 deletions
8
src/test/ui/error-codes/E0519.rs
Normal file
8
src/test/ui/error-codes/E0519.rs
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
// no need to create a new aux file, we can use an existing.
|
||||
// aux-build: crateresolve1-1.rs
|
||||
|
||||
// set same metadata as `crateresolve1`
|
||||
#![crate_name = "crateresolve1"]
|
||||
#![crate_type = "lib"]
|
||||
|
||||
extern crate crateresolve1; //~ ERROR E0519
|
||||
9
src/test/ui/error-codes/E0519.stderr
Normal file
9
src/test/ui/error-codes/E0519.stderr
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
error[E0519]: the current crate is indistinguishable from one of its dependencies: it has the same crate-name `crateresolve1` and was compiled with the same `-C metadata` arguments. This will result in symbol conflicts between the two.
|
||||
--> $DIR/E0519.rs:8:1
|
||||
|
|
||||
LL | extern crate crateresolve1;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0519`.
|
||||
|
|
@ -11,8 +11,8 @@ use regex::Regex;
|
|||
|
||||
// A few of those error codes can't be tested but all the others can and *should* be tested!
|
||||
const EXEMPTED_FROM_TEST: &[&str] = &[
|
||||
"E0313", "E0461", "E0465", "E0476", "E0490", "E0514", "E0519", "E0523", "E0554", "E0640",
|
||||
"E0717", "E0729", "E0789",
|
||||
"E0313", "E0461", "E0465", "E0476", "E0490", "E0514", "E0523", "E0554", "E0640", "E0717",
|
||||
"E0729", "E0789",
|
||||
];
|
||||
|
||||
// Some error codes don't have any tests apparently...
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue