Open
Description
This tracks the two lints associated with the strict provenance feature:
- fuzzy_provenance_casts: detects an
as
cast from an integer to a pointer. It is better to usewith_exposed_provenance
instead to make explicit what happens. - lossy_provenance_casts: detects an
as
cast from a pointer to an integer. It is better to useexpose_provenance
instead to make explicit what happens.
I am not sure if having two lints here is really justified, IMO they could be merged into one -- not sure what that one should be called, though. Other than that, this seems like a useful lint to ensure the codebase follows strict provenance (or opts-out explicitly, via the methods mentioned above).
I am also not sure if this shouldn't maybe be a clippy lint instead of a rustc lint?
Cc @rust-lang/opsem