rust/tests/ui/coroutine/reborrow-mut-upvar.rs

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

17 lines
227 B
Rust
Raw Normal View History

// run-pass
2023-10-19 16:46:28 -05:00
#![feature(coroutines)]
fn _run(bar: &mut i32) {
2023-10-19 16:46:28 -05:00
|| { //~ WARN unused coroutine that must be used
{
let _baz = &*bar;
yield;
}
*bar = 2;
};
}
fn main() {}