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 Move /src/test to /tests 2023-01-11 09:32:08 +00:00
anchors.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
assoc-reexport-super.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
associated-defaults.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
associated-items.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
basic.rs rustdoc: update test case with intra-doc link pointing to method 2023-02-22 08:40:47 -07:00
builtin-macros.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
crate-relative-assoc.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
crate-relative.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
disambiguators-removed.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
email-address.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
enum-struct-field.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
extern-builtin-type-impl.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
extern-crate-only-used-in-link.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
extern-crate.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
extern-inherent-impl.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
extern-reference-link.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
extern-type.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
external-traits.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
field.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
generic-params.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
generic-trait-impl.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
in-bodies.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
inherent-associated-types.rs IAT: Rustdoc integration 2023-05-04 16:59:11 +02:00
issue-66159.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-82209.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-103463.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-104145.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-108459.rs rustdoc: Fix LinkReplacer link matching 2023-05-30 21:22:30 +02:00
libstd-re-export.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
macros-disambiguators.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
mod-ambiguity.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
mod-relative.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
no-doc-primitive.rs Update tests for rustc_doc_primitive 2023-03-30 22:56:52 +02:00
non-path-primitives.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
prim-assoc.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
prim-associated-traits.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
prim-methods-external-core.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
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 Move /src/test to /tests 2023-01-11 09:32:08 +00:00
primitive-non-default-impl.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
private-failures-ignored.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
private.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
proc-macro.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
pub-use.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
raw-ident-self.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
reexport-additional-docs.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
self-cache.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
self.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
trait-impl.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
trait-item.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
true-false.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
type-alias.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00