1 warning: the feature `capture_disjoint_fields` is incomplete and may not be safe to use and/or cause compiler crashes
2 --> $DIR/arrays.rs:3:12
4 LL | #![feature(capture_disjoint_fields)]
5 | ^^^^^^^^^^^^^^^^^^^^^^^
7 = note: `#[warn(incomplete_features)]` on by default
8 = note: see issue #53488 <https://github.com/rust-lang/rust/issues/53488> for more information
10 error[E0503]: cannot use `arr` because it was mutably borrowed
11 --> $DIR/arrays.rs:15:5
14 | -- borrow of `arr` occurs here
16 | --- borrow occurs due to use of `arr` in closure
19 | ^^^^^^ use of borrowed `arr`
22 | - borrow later used here
24 error[E0503]: cannot use `arr[_]` because it was mutably borrowed
25 --> $DIR/arrays.rs:15:5
28 | -- borrow of `arr` occurs here
30 | --- borrow occurs due to use of `arr` in closure
33 | ^^^^^^^^^^^^ use of borrowed `arr`
36 | - borrow later used here
38 error[E0506]: cannot assign to `arr[_]` because it is borrowed
39 --> $DIR/arrays.rs:30:5
42 | -- borrow of `arr[_]` occurs here
43 LL | println!("{:#?}", &arr[3..4]);
44 | --- borrow occurs due to use in closure
47 | ^^^^^^^^^^^^ assignment to borrowed `arr[_]` occurs here
50 | - borrow later used here
52 error[E0506]: cannot assign to `arr[_]` because it is borrowed
53 --> $DIR/arrays.rs:44:5
56 | -- borrow of `arr[_]` occurs here
57 LL | println!("{}", arr[3]);
58 | --- borrow occurs due to use in closure
61 | ^^^^^^^^^^^^ assignment to borrowed `arr[_]` occurs here
64 | - borrow later used here
66 error[E0503]: cannot use `arr` because it was mutably borrowed
67 --> $DIR/arrays.rs:58:20
70 | -- borrow of `arr` occurs here
72 | --- borrow occurs due to use of `arr` in closure
74 LL | println!("{}", arr[3]);
75 | ^^^^^^ use of borrowed `arr`
78 | - borrow later used here
80 error[E0502]: cannot borrow `arr[_]` as immutable because it is also borrowed as mutable
81 --> $DIR/arrays.rs:58:20
84 | -- mutable borrow occurs here
86 | --- first borrow occurs due to use of `arr` in closure
88 LL | println!("{}", arr[3]);
89 | ^^^^^^ immutable borrow occurs here
92 | - mutable borrow later used here
94 error[E0502]: cannot borrow `arr` as immutable because it is also borrowed as mutable
95 --> $DIR/arrays.rs:74:24
98 | -- mutable borrow occurs here
100 | --- first borrow occurs due to use of `arr` in closure
102 LL | println!("{:#?}", &arr[3..2]);
103 | ^^^ immutable borrow occurs here
106 | - mutable borrow later used here
108 error: aborting due to 7 previous errors; 1 warning emitted
110 Some errors have detailed explanations: E0502, E0503, E0506.
111 For more information about an error, try `rustc --explain E0502`.