2 Checks for transmutes from an integer to a `char`.
5 Not every integer is a Unicode scalar value.
8 - [`from_u32`] which this lint suggests using is slower than `transmute`
9 as it needs to validate the input.
10 If you are certain that the input is always a valid Unicode scalar value,
11 use [`from_u32_unchecked`] which is as fast as `transmute`
12 but has a semantically meaningful name.
13 - You might want to handle `None` returned from [`from_u32`] instead of calling `unwrap`.
15 [`from_u32`]: https://doc.rust-lang.org/std/char/fn.from_u32.html
16 [`from_u32_unchecked`]: https://doc.rust-lang.org/std/char/fn.from_u32_unchecked.html
22 let _: char = std::mem::transmute(x); // where x: u32
26 let _ = std::char::from_u32(x).unwrap();