rustdoc search: filter by fields on a given type using .
#118912
Labels
A-rustdoc-search
Area: Rustdoc's search feature
C-feature-request
Category: A feature request, i.e: not implemented / a PR.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
I've caught myself many times trying to search for fields on a specific type by entering search queries like
tyctxt.types
, only to be greeted by Query parser error: "Unexpected.
".I'd love rustdoc to find all fields named
field
defined (directly or indirectly viaDeref
) on “record types”1 matching pathpath
given the inputpath.field
.For example, let's assume we are over at rustc's API docs and the query is
tyctxt.types
. Then, I'd expect rustdoc to find & link torustc_middle::ty::context::GlobalCtxt.types
(TyCtxt
derefs toGlobalCtxt
).We could even think about extending this feature to cover
path.field.subfield
in the future which would denote (pseudo)⟨typeof ⟦path.field⟧⟩.subfield
, although that'd probably be quite hairy to implement performantly.Related: #88660 (“item” kind filter
field
).Footnotes
Structs, tuple structs, enum variant structs and enum variant tuple structs. ↩
The text was updated successfully, but these errors were encountered: