rust/tests/ui/generator/issue-110929-generator-conflict-error-ice.rs

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

12 lines
220 B
Rust
Raw Normal View History

2023-04-28 11:50:28 -05:00
// edition:2021
#![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
2023-04-28 11:50:28 -05:00
};
}