summaryrefslogtreecommitdiffstats
path: root/tests/ui/coroutine/reborrow-mut-upvar.rs
blob: e4f717be8b5cc92d7c30d08e9b1efdefb1f53c18 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// run-pass

#![feature(coroutines)]

fn _run(bar: &mut i32) {
    || { //~ WARN unused coroutine that must be used
        {
            let _baz = &*bar;
            yield;
        }

        *bar = 2;
    };
}

fn main() {}