rust/tests/ui/coroutine/issue-110929-coroutine-conflict-error-ice.rs
2023-10-20 21:14:02 +00:00

12 lines
220 B
Rust

// edition:2021
#![feature(coroutines)]
fn main() {
let x = &mut ();
|| {
let _c = || yield *&mut *x;
|| _ = &mut *x;
//~^ cannot borrow `*x` as mutable more than once at a time
};
}