You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
transmute_undefined_repr: False positive on tuples of size 1 #8503
I believe transmute_undefined_repr intentionally avoids linting on structs / tuple structs containing 1 field, but it currently does lint on tuples containing 1 field. These should be treated consistently with 1-field tuple structs: either lint both or neither.
$ cargo clippyerror: transmute into `&(i32,)` which has an undefined layout --> src/main.rs:2:22 |2 | let _ = unsafe { std::mem::transmute::<&i32, &(i32,)>(&0) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[deny(clippy::transmute_undefined_repr)]` on by default = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#transmute_undefined_repr
Activity
Auto merge of #8547 - Jarcho:transmute_8501, r=flip1995