about summary refs log tree commit diff
path: root/tests/ui/mir/issue-77911.rs
blob: 4a5fdc653301db7a044ada43d1c991619be09309 (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() {}
}