Doing a &T to &mut T transmute is now undefined behaviour (it needs to use the Unsafe type), and so there could be a lint for it.
Unfortunately, such a lint is likely to miss many such casts, but it will theoretically catch common cases like transmute::<&Foo, &mut Foo>(self).
Doing a
&Tto&mut Ttransmute is now undefined behaviour (it needs to use theUnsafetype), and so there could be a lint for it.Unfortunately, such a lint is likely to miss many such casts, but it will theoretically catch common cases like
transmute::<&Foo, &mut Foo>(self).