about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/error-codes/E0519.rs8
-rw-r--r--src/test/ui/error-codes/E0519.stderr9
-rw-r--r--src/tools/tidy/src/error_codes_check.rs4
3 files changed, 19 insertions, 2 deletions
diff --git a/src/test/ui/error-codes/E0519.rs b/src/test/ui/error-codes/E0519.rs
new file mode 100644
index 00000000000..269ffd6320d
--- /dev/null
+++ b/src/test/ui/error-codes/E0519.rs
@@ -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
diff --git a/src/test/ui/error-codes/E0519.stderr b/src/test/ui/error-codes/E0519.stderr
new file mode 100644
index 00000000000..e24fc4aaa70
--- /dev/null
+++ b/src/test/ui/error-codes/E0519.stderr
@@ -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`.
diff --git a/src/tools/tidy/src/error_codes_check.rs b/src/tools/tidy/src/error_codes_check.rs
index 49fc2ceb3a2..fd870b0997c 100644
--- a/src/tools/tidy/src/error_codes_check.rs
+++ b/src/tools/tidy/src/error_codes_check.rs
@@ -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...