Skip to content

Rust API Guideline: Unsafe functions are documented with a "Safety" section #2207

@dtolnay

Description

@dtolnay

There should be a "Safety" section that explains all invariants that the caller is responsible for upholding to use the function correctly.

As per Function docs include error, panic, and safety considerations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintArea: New lintsL-guidelinesLint: Related to the Rust API GuidelinesT-ASTType: Requires working with the AST

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions