Skip to content

Minor documentation soundness hole in Validity? #2965

@jswrenn

Description

@jswrenn

Validity requires:

Any V: Validity must guarantee that this set is only a function of the bit validity of the referent type, T, and not of any other property of T.

...but Valid's guarantees concern both bit validity and safety. By this documentation, a Ptr::from_ref(&&42) is unsound, since the validity of the referent &42 depends its provenance, which isn't a property of bit validity.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions