- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
Open
Labels
A-strict-provenanceArea: Strict provenance for raw pointersArea: Strict provenance for raw pointersC-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-langRelevant to the language teamRelevant to the language team
Description
This tracks the two lints associated with the strict provenance feature:
- fuzzy_provenance_casts: detects an ascast from an integer to a pointer. It is better to usewith_exposed_provenanceinstead to make explicit what happens.
- lossy_provenance_casts: detects an ascast from a pointer to an integer. It is better to useexpose_provenanceinstead 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
Metadata
Metadata
Assignees
Labels
A-strict-provenanceArea: Strict provenance for raw pointersArea: Strict provenance for raw pointersC-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-langRelevant to the language teamRelevant to the language team