Closed
Description
I was experimenting with CoerceUnsized
and I encountered an ICE with this example:
#[derive(Clone)]
struct Redirectable<'a, T: ?Sized> {
data: Rc<Cell<&'a T>>
}
impl<U, T: CoerceUnsized<U>> CoerceUnsized<Redirectable<'_, U>> for Redirectable<'_, T> {}
This is hopefully an illegal CoerceUnsized
impl, as it would permit us to do illegal mutation (see the full playground link above for the context). Possible duplicate of #44861.
Note that the ICE requires a feature gate.