The current version mentions that "Transmuting an & to &mut is UB"
and then the sub-bullets (passionately!) dissuades people from doing so,
but without explaining a possible failure scenario. This change alludes
to the fact that such transmutation will run afoul of the assumptions
that the optimizer may legitimately make.
The current version mentions that "Transmuting an
&
to&mut
is UB" and then the sub-bullets (passionately!) dissuades people from doing so, but without explaining a possible failure scenario. This change alludes to the fact that such transmutation will run afoul of the assumptions that the optimizer may legitimately make.