Description
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 via Deref
) on “record types”1 matching path path
given the input path.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 to rustc_middle::ty::context::GlobalCtxt.types
(TyCtxt
derefs to GlobalCtxt
).
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. ↩