Skip to content

init() intrinsic is unsafe #3920

Closed
Closed
@nikomatsakis

Description

@nikomatsakis

The init() intrinsic seems to fill data with zeros. It's convenient. But it's unsafe as written! It should either be limited to POD types (via a new kind) or else designated unsafe.

I also think there should be an (unsafe) uninit() intrinsic (#3471).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions