Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panic on a simple type error #35024

Closed
ghost opened this issue Jul 25, 2016 · 4 comments
Closed

Panic on a simple type error #35024

ghost opened this issue Jul 25, 2016 · 4 comments

Comments

@ghost
Copy link

ghost commented Jul 25, 2016

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()).

@TimNN
Copy link
Contributor

TimNN commented Jul 25, 2016

I'm pretty sure that this was fixed by #33852 and should work fine in nightly.

@ghost
Copy link
Author

ghost commented Jul 25, 2016

I have no way to run nightly on my machine, feel free to close if fixed.

@oli-obk
Copy link
Contributor

oli-obk commented Jul 25, 2016

jup, works fine on nightly: https://is.gd/UeG59L

@ghost
Copy link
Author

ghost commented Jul 25, 2016

Ok, sorry for the noise.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants