Skip to content

Panic on a simple type error #35024

Closed
Closed
@ghost

Description

Rust 1.9.0 panics on the following (wrong) code:

use std::io::BufRead;
fn main() {
    let x = b"blabla blibli";
    let s = &x[..];
    let mut v = Vec::new();
    s.read_line(&mut v)
}

(but works fine with String::new() instead of Vec::new()).

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