forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtwo-phase-reservation-sharing-interference-future-compat-lint.stderr
More file actions
40 lines (37 loc) · 1.72 KB
/
Copy pathtwo-phase-reservation-sharing-interference-future-compat-lint.stderr
File metadata and controls
40 lines (37 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
warning: cannot borrow `v` as mutable because it is also borrowed as immutable
--> $DIR/two-phase-reservation-sharing-interference-future-compat-lint.rs:24:9
|
LL | let shared = &v;
| -- immutable borrow occurs here
LL |
LL | v.push(shared.len());
| ^ ------ immutable borrow later used here
| |
| mutable borrow occurs here
|
note: the lint level is defined here
--> $DIR/two-phase-reservation-sharing-interference-future-compat-lint.rs:18:13
|
LL | #![warn(mutable_borrow_reservation_conflict)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= warning: this borrowing pattern was not meant to be accepted, and may become a hard error in the future
= note: for more information, see issue #59159 <https://github.com/rust-lang/rust/issues/59159>
error: cannot borrow `v` as mutable because it is also borrowed as immutable
--> $DIR/two-phase-reservation-sharing-interference-future-compat-lint.rs:37:9
|
LL | let shared = &v;
| -- immutable borrow occurs here
LL |
LL | v.push(shared.len());
| ^ ------ immutable borrow later used here
| |
| mutable borrow occurs here
|
note: the lint level is defined here
--> $DIR/two-phase-reservation-sharing-interference-future-compat-lint.rs:31:13
|
LL | #![deny(mutable_borrow_reservation_conflict)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= warning: this borrowing pattern was not meant to be accepted, and may become a hard error in the future
= note: for more information, see issue #59159 <https://github.com/rust-lang/rust/issues/59159>
error: aborting due to previous error; 1 warning emitted