about summary refs log tree commit diff
path: root/src/test/rustdoc-ui/reference-links.rs
diff options
context:
space:
mode:
authorJoshua Nelson <joshua@yottadb.com>2020-12-26 09:47:11 -0500
committerJoshua Nelson <jyn514@gmail.com>2020-12-26 12:11:44 -0500
commit0f2571235b4ac60190b9d2dfe745367671c27c0f (patch)
tree72346dac3dc10b03bf23d6031e9f46f7ef729d14 /src/test/rustdoc-ui/reference-links.rs
parent1f5beec3b111560be181283009ef96da6ac5e7a7 (diff)
downloadrust-0f2571235b4ac60190b9d2dfe745367671c27c0f.tar.gz
rust-0f2571235b4ac60190b9d2dfe745367671c27c0f.zip
Revert "Cleanup markdown span handling"
This caused a diagnostic regression, originally it was:

```
warning: unresolved link to `std::process::Comman`
 --> link.rs:3:10
  |
3 | //! [a]: std::process::Comman
  |          ^^^^^^^^^^^^^^^^^^^^ no item named `Comman` in module `process`
  |
  = note: `#[warn(broken_intra_doc_links)]` on by default
```
but after that PR rustdoc now displays
```
warning: unresolved link to `std::process::Comman`
 --> link.rs:1:14
  |
1 | //! Links to [a] [link][a]
  |              ^^^ no item named `Comman` in module `process`
  |
  = note: `#[warn(broken_intra_doc_links)]` on by default
```
which IMO is much less clear.
Diffstat (limited to 'src/test/rustdoc-ui/reference-links.rs')
-rw-r--r--src/test/rustdoc-ui/reference-links.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/rustdoc-ui/reference-links.rs b/src/test/rustdoc-ui/reference-links.rs
new file mode 100644
index 00000000000..7c1a79722c9
--- /dev/null
+++ b/src/test/rustdoc-ui/reference-links.rs
@@ -0,0 +1,7 @@
+// Test that errors point to the reference, not to the title text.
+#![deny(broken_intra_doc_links)]
+//! Links to [a] [link][a]
+//!
+//! [a]: std::process::Comman
+//~^ ERROR unresolved
+//~| ERROR unresolved