mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
1d6e7ec8d4
Reflection TypeId::trait_info_of *[View all comments](https://triagebot.infra.rust-lang.org/gh-comments/rust-lang/rust/pull/152003)* This is for https://github.com/rust-lang/rust/issues/146922. As https://github.com/rust-lang/rust/pull/151236 was requested to be remade by someone I implemented the functionality as `TypeId::trait_info_of` which additionally allows getting the vtable pointer to build `dyn` Objects in recursive reflection. It allows checking if a TypeId implements a trait. Since this is my first PR feel free to tell me if there are any formal issues.