about summary refs log tree commit diff
path: root/tests/ui/nll/loan_ends_mid_block_vec.stderr
blob: c0b97bea348c4b99c5b07be4ce1d53635ee7abd1 (plain)
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
error[E0499]: cannot borrow `data` as mutable more than once at a time
  --> $DIR/loan_ends_mid_block_vec.rs:11:5
   |
LL |     let slice = &mut data;
   |                 --------- first mutable borrow occurs here
LL |     capitalize(slice);
LL |     data.push('d');
   |     ^^^^ second mutable borrow occurs here
...
LL |     capitalize(slice);
   |                ----- first borrow later used here

error[E0499]: cannot borrow `data` as mutable more than once at a time
  --> $DIR/loan_ends_mid_block_vec.rs:13:5
   |
LL |     let slice = &mut data;
   |                 --------- first mutable borrow occurs here
...
LL |     data.push('e');
   |     ^^^^ second mutable borrow occurs here
...
LL |     capitalize(slice);
   |                ----- first borrow later used here

error[E0499]: cannot borrow `data` as mutable more than once at a time
  --> $DIR/loan_ends_mid_block_vec.rs:15:5
   |
LL |     let slice = &mut data;
   |                 --------- first mutable borrow occurs here
...
LL |     data.push('f');
   |     ^^^^ second mutable borrow occurs here
LL |
LL |     capitalize(slice);
   |                ----- first borrow later used here

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0499`.