Skip to content

Panic when filling an empty slice #460

@Razican

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

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions