We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This code snippet causes rustc to panic:
fn trim_lines(text: &str) -> impl Iterator<Item=&str> { let mut prefix_length = 0; for c in text.chars() { match c { ' ' => prefix_length += 1, '\n' => continue, _ => break, } } text.lines().map(|line| { if line.len() >= prefix_length { &line[prefix_length..] } else { line } }) } fn main() { trim_lines("hello"); }
rustc 1.23.0-nightly (33374fa 2017-11-20) binary: rustc commit-hash: 33374fa commit-date: 2017-11-20 host: x86_64-unknown-linux-gnu release: 1.23.0-nightly LLVM version: 4.0
The same thing happens with 1.24 nightly too on rust playground.
The text was updated successfully, but these errors were encountered:
Duplicate of #42479
Sorry, something went wrong.
No branches or pull requests
This code snippet causes rustc to panic:
Meta
rustc 1.23.0-nightly (33374fa 2017-11-20)
binary: rustc
commit-hash: 33374fa
commit-date: 2017-11-20
host: x86_64-unknown-linux-gnu
release: 1.23.0-nightly
LLVM version: 4.0
The same thing happens with 1.24 nightly too on rust playground.
The text was updated successfully, but these errors were encountered: