Skip to content

UB in Collect:: reserve_get_tail_slice #851

Closed
@erickt

Description

@erickt

It appears that Collect::reserve_get_tail_slice might have undefined behavior. The code is reserving uninitialized space, then creating a mutable reference to it. This us UB according to this documentation.

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