blob: acf4c20542d72592a8340beb636a9d4491823e8e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// compile-flags: -Z mir-opt-level=3
// 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() {}
}
|