]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/two-phase-reservation-sharing-interference-future-compat-lint.stderr
Rollup merge of #88090 - nbdd0121:inference, r=nikomatsakis
[rust.git] / src / test / ui / borrowck / two-phase-reservation-sharing-interference-future-compat-lint.stderr
1 warning: cannot borrow `v` as mutable because it is also borrowed as immutable
2   --> $DIR/two-phase-reservation-sharing-interference-future-compat-lint.rs:24:9
3    |
4 LL |         let shared = &v;
5    |                      -- immutable borrow occurs here
6 LL | 
7 LL |         v.push(shared.len());
8    |         ^^^^^^^------------^
9    |         |      |
10    |         |      immutable borrow later used here
11    |         mutable borrow occurs here
12    |
13 note: the lint level is defined here
14   --> $DIR/two-phase-reservation-sharing-interference-future-compat-lint.rs:18:13
15    |
16 LL |     #![warn(mutable_borrow_reservation_conflict)]
17    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18    = warning: this borrowing pattern was not meant to be accepted, and may become a hard error in the future
19    = note: for more information, see issue #59159 <https://github.com/rust-lang/rust/issues/59159>
20
21 error: cannot borrow `v` as mutable because it is also borrowed as immutable
22   --> $DIR/two-phase-reservation-sharing-interference-future-compat-lint.rs:37:9
23    |
24 LL |         let shared = &v;
25    |                      -- immutable borrow occurs here
26 LL | 
27 LL |         v.push(shared.len());
28    |         ^^^^^^^------------^
29    |         |      |
30    |         |      immutable borrow later used here
31    |         mutable borrow occurs here
32    |
33 note: the lint level is defined here
34   --> $DIR/two-phase-reservation-sharing-interference-future-compat-lint.rs:31:13
35    |
36 LL |     #![deny(mutable_borrow_reservation_conflict)]
37    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
38    = warning: this borrowing pattern was not meant to be accepted, and may become a hard error in the future
39    = note: for more information, see issue #59159 <https://github.com/rust-lang/rust/issues/59159>
40
41 error: aborting due to previous error; 1 warning emitted
42