1 error: casting &T to &mut T may cause undefined behaviour, consider instead using an UnsafeCell
2 --> $DIR/cast_ref_to_mut.rs:18:9
4 LL | (*(a as *const _ as *mut String)).push_str(" world");
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7 = note: `-D clippy::cast-ref-to-mut` implied by `-D warnings`
9 error: casting &T to &mut T may cause undefined behaviour, consider instead using an UnsafeCell
10 --> $DIR/cast_ref_to_mut.rs:19:9
12 LL | *(a as *const _ as *mut _) = String::from("Replaced");
13 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
15 error: casting &T to &mut T may cause undefined behaviour, consider instead using an UnsafeCell
16 --> $DIR/cast_ref_to_mut.rs:20:9
18 LL | *(a as *const _ as *mut String) += " world";
19 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
21 error: aborting due to 3 previous errors