rust/tests/rustdoc-js-std
Michael Howell 3fbfe2bca5 rustdoc-search: add impl disambiguator to duplicate assoc items
Helps with #90929

This changes the search results, specifically, when there's more than
one impl with an associated item with the same name. For example,
the search queries `simd<i8> -> simd<i8>` and `simd<i64> -> simd<i64>`
don't link to the same function, but most of the functions have the
same names.

This change should probably be FCP-ed, especially since it adds a new
anchor link format for `main.js` to handle, so that URLs like
`struct.Vec.html#impl-AsMut<[T]>-for-Vec<T,+A>/method.as_mut` redirect
to `struct.Vec.html#method.as_mut-2`. It's a strange design, but there
are a few reasons for it:

* I'd like to avoid making the HTML bigger. Obviously, fixing this bug
  is going to add at least a little more data to the search index, but
  adding more HTML penalises viewers for the benefit of searchers.

* Breaking `struct.Vec.html#method.len` would also be a disappointment.

On the other hand:

* The path-style anchors might be less prone to link rot than the numbered
  anchors. It's definitely less likely to have URLs that appear to "work",
  but silently point at the wrong thing.

* This commit arranges the path-style anchor to redirect to the numbered
  anchor. Nothing stops rustdoc from doing the opposite, making path-style
  anchors the default and redirecting the "legacy" numbered ones.
2023-09-21 15:16:44 -07:00
..
alias-1.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
alias-2.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
alias-3.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
alias-4.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
alias.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
asrawfd.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
basic.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
bufread-fill-buf.js rustdoc-search: fix order-independence bug 2023-06-11 18:57:33 -07:00
deduplication.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
enum-option.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
filter-crate.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
fn-forget.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
from_u.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
full-path-function.js Add tests for type-based search 2023-09-01 15:16:11 +02:00
keyword.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
macro-check.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
macro-print.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
never.js rustdoc-search: search never type with ! 2023-06-12 17:30:23 -07:00
option-type-signatures.js rustdoc-search: fix bugs when unboxing and reordering combine 2023-09-09 16:58:37 -07:00
osstring-to-string.js rustdoc: add note about slice/array searches to help popup 2023-06-10 14:08:26 -07:00
parser-errors.js Fix eBNF and handling of whitespace characters when not in a path 2023-06-14 14:22:17 +02:00
parser-filter.js Update rustdoc-js-std tests 2023-06-14 14:22:17 +02:00
parser-generics.js Update rustdoc-js-std tests 2023-06-14 14:22:17 +02:00
parser-ident.js rustdoc-search: search never type with ! 2023-06-12 17:30:23 -07:00
parser-literal.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
parser-paths.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
parser-quote.js Update rustdoc-js-std tests 2023-06-14 14:22:17 +02:00
parser-returned.js rustdoc-search: search never type with ! 2023-06-12 17:30:23 -07:00
parser-separators.js Update rustdoc-js-std tests 2023-06-14 14:22:17 +02:00
parser-slice-array.js Update rustdoc-js-std tests 2023-06-14 14:22:17 +02:00
parser-weird-queries.js Update rustdoc-js-std tests 2023-06-14 14:22:17 +02:00
path-ordering.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
primitive.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
println-typo.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
quoted.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
reference-shrink.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
regex.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
return-specific-literal.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
return-specific.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
should-fail.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
simd-type-signatures.js rustdoc-search: add impl disambiguator to duplicate assoc items 2023-09-21 15:16:44 -07:00
string-from_ut.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
struct-vec.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
typed-query.js Update rustdoc-js* format 2023-06-09 17:00:47 +02:00
vec-new.js Add "vec new" test 2023-06-14 14:22:17 +02:00
vec-type-signatures.js rustdoc-search: fix bugs when unboxing and reordering combine 2023-09-09 16:58:37 -07:00