mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
13 lines
262 B
Rust
13 lines
262 B
Rust
// edition:2021
|
|
// compile-flags: -Zdrop-tracking-mir=yes
|
|
#![feature(generators)]
|
|
|
|
fn main() {
|
|
let x = &mut ();
|
|
|| {
|
|
let _c = || yield *&mut *x;
|
|
|| _ = &mut *x;
|
|
//~^ cannot borrow `*x` as mutable more than once at a time
|
|
};
|
|
}
|