Open
Description
Currently, the only suggestion rustdoc gives is to simply escape [
and ]
with backslashes, or if there is a similarly-named item, to link to that instead.
there are a few other common errors that it could catch though:
- code snippets (like
arr[idx+3]
) should be surrounded by backticks instead of escaping each bracket individually - if there is a similarly-named link reference definition, it should suggest referencing that (probable typo)
- if the type that is being linked to is outside the current documentation bundle (e.g. linking to a type in an alternative library for the purpose of comparison, or linking to a non-rust type), then it should recommend adding a link definition item.
inspired by discussion on #132748