Commit Graph

2 Commits

Author SHA1 Message Date
aobatact ecf527faaf Relax T: Sized bound on try_as_dyn / try_as_dyn_mut
`trait_info_of` already returns `None` for unsized types, so allowing
`T: ?Sized` is sound and lets callers in generic contexts use these
functions without a separate `Sized` bound. For unsized `T`, the
function always returns `None`.
2026-05-03 23:00:31 +09:00
Ivar Flakstad d5bf1a4c9a Introduce vtable_for intrinsic and use it to implement try_as_dyn and try_as_dyn_mut for fallible coercion from &T / &mut T to &dyn Trait. 2025-12-16 06:39:58 -04:00