Rustdoc ICE when docstring contains ampersand link “[&]” followed by link to valid item in backticks #111896
Labels
A-intra-doc-links
Area: Intra-doc links, the ability to link to items in docs by name
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
cargo doc
produces an ICE when[&]
is followed by (with a space or other text in between) a link to a valid Rust item surrounded in backticks (e.g.,[`u8`]
).For example, given this code:
cargo doc
produces the following error:Backtrace
If the
[`u8`]
is changed to[u8]
, or if the[`u8`]
and[&]
are reordered,cargo doc
runs as expected, creating links to the documentation foru8
and the primitive reference type. If[`u8`]
is changed so it does not refer to a valid Rust item,cargo doc
will also run without error (just warnings).Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: