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.
This commit is contained in:
parent
1f5beec3b1
commit
0f2571235b
4 changed files with 123 additions and 86 deletions
7
src/test/rustdoc-ui/reference-links.rs
Normal file
7
src/test/rustdoc-ui/reference-links.rs
Normal file
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue