27 lines
973 B
Plaintext
27 lines
973 B
Plaintext
|
warning: the feature `capture_disjoint_fields` is incomplete and may not be safe to use and/or cause compiler crashes
|
||
|
--> $DIR/multilevel-path.rs:4:12
|
||
|
|
|
||
|
LL | #![feature(capture_disjoint_fields)]
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
= note: `#[warn(incomplete_features)]` on by default
|
||
|
= note: see issue #53488 <https://github.com/rust-lang/rust/issues/53488> for more information
|
||
|
|
||
|
error[E0499]: cannot borrow `w.p.x` as mutable more than once at a time
|
||
|
--> $DIR/multilevel-path.rs:23:14
|
||
|
|
|
||
|
LL | let mut c = || {
|
||
|
| -- first mutable borrow occurs here
|
||
|
LL | w.p.x += 20;
|
||
|
| - first borrow occurs due to use of `w.p.x` in closure
|
||
|
...
|
||
|
LL | let py = &mut w.p.x;
|
||
|
| ^^^^^^^^^^ second mutable borrow occurs here
|
||
|
LL |
|
||
|
LL | c();
|
||
|
| - first borrow later used here
|
||
|
|
||
|
error: aborting due to previous error; 1 warning emitted
|
||
|
|
||
|
For more information about this error, try `rustc --explain E0499`.
|