2 Checks for transmutes between collections whose
3 types have different ABI, size or alignment.
6 This is undefined behavior.
9 Currently, we cannot know whether a type is a
10 collection, so we just lint the ones that come with `std`.
14 // different size, therefore likely out-of-bounds memory access
15 // You absolutely do not want this in your code!
17 std::mem::transmute::<_, Vec<u32>>(vec![2_u16])
21 You must always iterate, map and collect the values:
24 vec![2_u16].into_iter().map(u32::from).collect::<Vec<_>>();