2023-04-28 11:50:28 -05:00
|
|
|
// edition:2021
|
|
|
|
// compile-flags: -Zdrop-tracking-mir=yes
|
|
|
|
#![feature(generators)]
|
|
|
|
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|