Skip to content

Tracking Issue for strict_provenance_lints #130351

Open
@RalfJung

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 use with_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 use expose_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

Metadata

Assignees

No one assigned

    Labels

    A-strict-provenanceArea: Strict provenance for raw pointersC-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCT-langRelevant to the language team, which will review and decide on the PR/issue.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions