about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/test/rustdoc-ui/pub-export-lint.rs8
-rw-r--r--src/test/rustdoc-ui/pub-export-lint.stderr23
2 files changed, 31 insertions, 0 deletions
diff --git a/src/test/rustdoc-ui/pub-export-lint.rs b/src/test/rustdoc-ui/pub-export-lint.rs
new file mode 100644
index 00000000000..31953206fd9
--- /dev/null
+++ b/src/test/rustdoc-ui/pub-export-lint.rs
@@ -0,0 +1,8 @@
+#![deny(broken_intra_doc_links)]
+
+/// [somewhere]
+//~^ ERROR unresolved link to `somewhere`
+pub use std::str::*;
+/// [aloha]
+//~^ ERROR unresolved link to `aloha`
+pub use std::task::RawWakerVTable;
diff --git a/src/test/rustdoc-ui/pub-export-lint.stderr b/src/test/rustdoc-ui/pub-export-lint.stderr
new file mode 100644
index 00000000000..54fe113be65
--- /dev/null
+++ b/src/test/rustdoc-ui/pub-export-lint.stderr
@@ -0,0 +1,23 @@
+error: unresolved link to `somewhere`
+  --> $DIR/pub-export-lint.rs:3:6
+   |
+LL | /// [somewhere]
+   |      ^^^^^^^^^ the module `pub_export_lint` contains no item named `somewhere`
+   |
+note: the lint level is defined here
+  --> $DIR/pub-export-lint.rs:1:9
+   |
+LL | #![deny(broken_intra_doc_links)]
+   |         ^^^^^^^^^^^^^^^^^^^^^^
+   = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
+
+error: unresolved link to `aloha`
+  --> $DIR/pub-export-lint.rs:6:6
+   |
+LL | /// [aloha]
+   |      ^^^^^ the module `pub_export_lint` contains no item named `aloha`
+   |
+   = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
+
+error: aborting due to 2 previous errors
+