Closed
Description
(&1u32 as *const u32 as *const ()) as *const u32;
Is currently caught by cast_ptr_alignment
.
I discussed this with @Manishearth last night and we came to the conclusion that we don't have enough information at this point to lint this case. It's a common pattern to cast from ZST pointers to larger types and the lint will always trigger here. We have to assume here that the user knows where the pointer was produced. We can't draw any conclusions from the left-hand pointer.
The situation is similar to c_void
, which is already ignored.
Metadata
Metadata
Assignees
Labels
No labels