-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rustdoc: allow searches to match against both type and name #131852
base: master
Are you sure you want to change the base?
rustdoc: allow searches to match against both type and name #131852
Conversation
Some changes occurred in HTML/CSS/JS. cc @GuillaumeGomez, @jsha |
This comment has been minimized.
This comment has been minimized.
c4e90b8
to
6ff6aed
Compare
cleaned up the formatting a bit, hopefully this satisfies tidy |
This comment has been minimized.
This comment has been minimized.
6ff6aed
to
8fdad93
Compare
I can't say that I like that comma. If it's tough to get rid of it (I think it would be, since it would require infinite lookahead to distinguish Intra-doc links use a disambiguator that's separated from the item itself with an |
This comment has been minimized.
This comment has been minimized.
why do we even allow spaces in item names? |
@lolbinarycat #108537 was when that was added. The idea was that name-based search worked well when space was used to separate path components, because it's easier than |
ah, that makes sense. we should probably document that behavior somewhere. i mean... if we're going treat spaces as :: in that case, we should probably do it here too, since this does support path-based search. i think adding less special cases to the syntax is a good thing, and it would be weird if ultimately, it might not be the "prettiest", but i think keeping the syntax easy to learn and understand is the most important thing. |
https://doc.rust-lang.org/nightly/rustdoc/read-documentation/search.html#search-by-name is supposed to describe it. |
☔ The latest upstream changes (presumably #127589) made this pull request unmergeable. Please resolve the merge conflicts. |
repurposes existing syntax that previously had a nonsese meaning. now `fn:add, u8 -> u8` searches for fn items with "add" in the name, that take a `u8` argument and return a `u8`. the kind is included in anticipation that type based searches will soon work on items other than functions and methods. fixes rust-lang#131130
8fdad93
to
5caf9c0
Compare
The job Click to see the possible cause of the failure (guessed by this bot)
|
repurposes existing syntax that previously had a nonsese meaning.
now
fn:add, u8 -> u8
searches for fn items with "add" in the name, that take au8
argument and return au8
.the kind is included in anticipation that type based searches will soon work on items other than functions and methods.
fixes #131130
r? @notriddle