]> git.lizzy.rs Git - rust.git/blob - tests/ui/closures/2229_closure_analysis/diagnostics/multilevel-path.stderr
Auto merge of #107843 - bjorn3:sync_cg_clif-2023-02-09, r=bjorn3
[rust.git] / tests / ui / closures / 2229_closure_analysis / diagnostics / multilevel-path.stderr
1 error[E0499]: cannot borrow `w.p.x` as mutable more than once at a time
2   --> $DIR/multilevel-path.rs:23:14
3    |
4 LL |     let mut c = || {
5    |                 -- first mutable borrow occurs here
6 LL |         w.p.x += 20;
7    |         ----- first borrow occurs due to use of `w.p.x` in closure
8 ...
9 LL |     let py = &mut w.p.x;
10    |              ^^^^^^^^^^ second mutable borrow occurs here
11 LL |
12 LL |     c();
13    |     - first borrow later used here
14
15 error: aborting due to previous error
16
17 For more information about this error, try `rustc --explain E0499`.