mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
Update search-result-impl-disambiguation.goml
This commit is contained in:
parent
20b93b951a
commit
2a4c9d0756
@ -354,13 +354,13 @@ function preLoadCss(cssUrl) {
|
||||
expandSection(pageId);
|
||||
}
|
||||
}
|
||||
if (savedHash.startsWith("#impl-")) {
|
||||
if (savedHash.startsWith("impl-")) {
|
||||
// impl-disambiguated links, used by the search engine
|
||||
// format: impl-X[-for-Y]/method.WHATEVER
|
||||
// turn this into method.WHATEVER[-NUMBER]
|
||||
const splitAt = savedHash.indexOf("/");
|
||||
if (splitAt !== -1) {
|
||||
const implId = savedHash.slice(1, splitAt);
|
||||
const implId = savedHash.slice(0, splitAt);
|
||||
const assocId = savedHash.slice(splitAt + 1);
|
||||
const implElem = document.getElementById(implId);
|
||||
if (implElem && implElem.parentElement.tagName === "SUMMARY" &&
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
// Checks that, if a type has two methods with the same name, they both get
|
||||
// linked correctly.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
|
||||
// This should link to the inherent impl
|
||||
write: (".search-input", "ZyxwvutMethodDisambiguation -> bool")
|
||||
@ -22,7 +22,7 @@ assert-document-property: ({
|
||||
}, ENDS_WITH)
|
||||
assert: "section:target"
|
||||
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
|
||||
// This should link to the trait impl
|
||||
write: (".search-input", "ZyxwvutMethodDisambiguation, usize -> usize")
|
||||
|
Loading…
Reference in New Issue
Block a user