Function type_equalities::coerce_mut[][src]

pub fn coerce_mut<T: ?Sized, U: ?Sized>(t: &mut T, ev: TypeEq<T, U>) -> &mut U
Expand description

Coerce a value of type &mut T to a value of type &mut U, given evidence that T == U.

Examples

assert_eq!(*coerce_ref(&mut 42, refl()), 42);