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 Update tests for rustc_doc_primitive 2023-03-30 22:56:52 +02:00
cross-crate
anchors.rs
assoc-reexport-super.rs
associated-defaults.rs
associated-items.rs
basic.rs rustdoc: update test case with intra-doc link pointing to method 2023-02-22 08:40:47 -07:00
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 IAT: Rustdoc integration 2023-05-04 16:59:11 +02:00
issue-66159.rs
issue-82209.rs
issue-103463.rs
issue-104145.rs
issue-108459.rs rustdoc: Fix LinkReplacer link matching 2023-05-30 21:22:30 +02:00
libstd-re-export.rs
macros-disambiguators.rs
mod-ambiguity.rs
mod-relative.rs
no-doc-primitive.rs Update tests for rustc_doc_primitive 2023-03-30 22:56:52 +02:00
non-path-primitives.rs
prim-assoc.rs
prim-associated-traits.rs
prim-methods-external-core.rs
prim-methods-local.rs Update tests for rustc_doc_primitive 2023-03-30 22:56:52 +02:00
prim-methods.rs rustdoc: remove std:: from primitive intra-doc link tooltips 2023-03-15 11:34:37 -07:00
prim-precedence.rs rustdoc: Fix LinkReplacer link matching 2023-05-30 21:22:30 +02:00
prim-self.rs Update tests for rustc_doc_primitive 2023-03-30 22:56:52 +02:00
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