2021-03-04 07:35:11 -06:00
|
|
|
// compile-flags: -Z mir-opt-level=3
|
2020-10-20 03:07:56 -05: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() {}
|
|
|
|
}
|