docs/test: add UI test and long-form error docs for E0519

This commit is contained in:
Ezra Shaw 2022-12-21 13:48:12 +13:00
parent 270c94e484
commit da7fcc7a09
No known key found for this signature in database
GPG key ID: 17CD5C2ADAE0D344
5 changed files with 60 additions and 3 deletions

View 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

View 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`.

View file

@ -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...