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-search: search for references #124148
base: master
Are you sure you want to change the base?
Conversation
rustbot has assigned @GuillaumeGomez. Use |
Some changes occurred in HTML/CSS/JS. cc @GuillaumeGomez, @jsha |
57398df
to
c514471
Compare
Looks good to me, thanks! Since it extends the search capabilities, let's start an FCP. @rfcbot fcp merge |
Team member @GuillaumeGomez has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
This feature extends rustdoc with syntax and search index information for searching borrow references. Part of #60485
Preview
&mut
&Option<T> -> Option<&T>
&mut Option<T> -> Option<&mut T>
Updated chapter of the book: https://notriddle.com/rustdoc-html-demo-11/reference/rustdoc/read-documentation/search.html
Motivation
See #119676
Guide-level explanation
You can't search by lifetimes, but other than that it's the same syntax references normally use.
Reference-level description
[]
primitive:slice
and/orprimitive:array
[T]
primitive:slice<T>
and/orprimitive:array<T>
!
primitive:never
()
primitive:unit
and/orprimitive:tuple
(T)
T
(T,)
primitive:tuple<T>
(T, U -> V, W)
fn(T, U) -> (V, W)
, Fn, FnMut, and FnOnce&
primitive:reference
&mut
primitive:reference<keyword:mut>
&T
primitive:reference<T>
&mut T
primitive:reference<keyword:mut, T>
Search query grammar
Future direction
As described in #118194 and #119676
ReferenceType
is now supported)