rust/tests/rustdoc/intra-doc
Dylan DPC 0baa30129b
Rollup merge of #108459 - benediktwerner:rustdoc-fix-link-match, r=GuillaumeGomez
rustdoc: Fix LinkReplacer link matching

It currently just uses the first link with the same href which might not necessarily be the matching one.

This fixes replacements when there are several links to the same item but with different text (e.g. `[X] and [struct@X]`). It also fixes replacements in summaries since those use a links list with empty hrefs, so currently all links would always match the first link by href but then not match its text. This could also lead to a panic in the `original_lext[1..len() - 1]` part when the first link only has a single character, which is why the new code uses `.get(..)` instead.
2023-06-01 11:09:42 +05:30
..
auxiliary
cross-crate
anchors.rs
assoc-reexport-super.rs
associated-defaults.rs
associated-items.rs
basic.rs
builtin-macros.rs
crate-relative-assoc.rs
crate-relative.rs
disambiguators-removed.rs
email-address.rs
enum-struct-field.rs
extern-builtin-type-impl.rs
extern-crate-only-used-in-link.rs
extern-crate.rs
extern-inherent-impl.rs
extern-reference-link.rs
extern-type.rs
external-traits.rs
field.rs
generic-params.rs
generic-trait-impl.rs
in-bodies.rs
inherent-associated-types.rs
issue-66159.rs
issue-82209.rs
issue-103463.rs
issue-104145.rs
issue-108459.rs
libstd-re-export.rs
macros-disambiguators.rs
mod-ambiguity.rs
mod-relative.rs
no-doc-primitive.rs
non-path-primitives.rs
prim-assoc.rs
prim-associated-traits.rs
prim-methods-external-core.rs
prim-methods-local.rs
prim-methods.rs
prim-precedence.rs
prim-self.rs
primitive-disambiguators.rs
primitive-non-default-impl.rs
private-failures-ignored.rs
private.rs
proc-macro.rs
pub-use.rs
raw-ident-self.rs
reexport-additional-docs.rs
self-cache.rs
self.rs
trait-impl.rs
trait-item.rs
true-false.rs
type-alias.rs