Add lint for u8 as *mut cast #42915
Labels
A-lint
Area: Lints (warnings about flaws in source code) such as unused_mut.
C-feature-request
Category: A feature request, i.e: not implemented / a PR.
This is an easy error to make: #42901 #42827
A cast from u8 to a pointer is probably always an error. In the rare case that you're creating a pointer into the first 256 bytes of address space,
u8 as usize as *mut
is more clear, or you can be troubled to#[allow(u8_to_ptr)]
.The text was updated successfully, but these errors were encountered: