Skip to content

Separate safety contract from correctness / panic freedom #3567

@celinval

Description

@celinval

Users should be able to annotate their unsafe functions with safety conditions and to differentiate between safety and panic freedom / correctness properties.

For example, the Index function index and the slice get_unchecked have the same pre-conditions, however, violating these conditions have very different consequences. Many users of index rely on the fact that it will panic if their assumptions about the index is incorrect. Thus, their contracts should reflect this difference.

Metadata

Metadata

Assignees

No one assigned

    Labels

    [C] Feature / EnhancementA new feature request or enhancement to an existing feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions