Skip to content

Panic when filling an empty slice #460

Description

@Razican

Not sure if this is a bug or desired (non documented) behavior:

This code will panic with the latest rand 0.5.0-pre.2:

use rand::{thread_rng, Rng};

let mut a: Vec<i32> = Vec::new();
thread_rng().fill(&mut a[..]);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions