2023-04-28 11:50:28 -05:00
|
|
|
// edition:2021
|
2023-10-19 16:46:28 -05:00
|
|
|
#![feature(coroutines)]
|
2023-04-28 11:50:28 -05:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let x = &mut ();
|
|
|
|
|| {
|
|
|
|
let _c = || yield *&mut *x;
|
|
|
|
|| _ = &mut *x;
|
2023-04-28 12:37:56 -05:00
|
|
|
//~^ cannot borrow `*x` as mutable more than once at a time
|
2023-04-28 11:50:28 -05:00
|
|
|
};
|
|
|
|
}
|