You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expose more info about ADTs and functions in rustc_public
This allows users of `rustc_public` to do more complex navigation
through data structures by exposing the following info:
* `AdtDef::generics_of` - Get the generics for the ADT.
* `AdtDef::inherent_impls` - Get all the impls for the ADT.
* `FnDef::associated_item` - Get the trait or impl block that contains the
function if it exists.
* `FnDef::generics_of` - get the generics for a given function.
* `ImplDef::generics_of` - Get the generics for the impl block.
* `ImplDef` implements `CrateDefType` - figure out the type of the impl
block with `CrateDefType::ty()` or get the normalized type with
`CrateDefType::ty_with_args()`.
This was partially written with the help of Gemini, but I reviewed the
code it generated.
0 commit comments