rust/tests/ui/mir/issue-77911.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
293 B
Rust
Raw Normal View History

// compile-flags: -Z mir-opt-level=3
2020-10-20 08:07:56 +00:00
// build-pass
use std::fs::File;
use std::io::{BufRead, BufReader};
fn file_lines() -> impl Iterator<Item = String> {
BufReader::new(File::open("").unwrap())
.lines()
.map(Result::unwrap)
}
fn main() {
for _ in file_lines() {}
}