]> git.proxmox.com Git - rustc.git/blob - tests/ui/borrowck/borrowck-borrow-overloaded-deref.stderr
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / borrowck / borrowck-borrow-overloaded-deref.stderr
1 error[E0596]: cannot borrow data in an `Rc` as mutable
2 --> $DIR/borrowck-borrow-overloaded-deref.rs:12:19
3 |
4 LL | let __isize = &mut *x;
5 | ^^^^^^^ cannot borrow as mutable
6 |
7 = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `Rc<isize>`
8
9 error[E0596]: cannot borrow data in an `Rc` as mutable
10 --> $DIR/borrowck-borrow-overloaded-deref.rs:16:19
11 |
12 LL | let __isize = &mut *x;
13 | ^^^^^^^ cannot borrow as mutable
14 |
15 = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `Rc<isize>`
16
17 error[E0596]: cannot borrow data in an `Rc` as mutable
18 --> $DIR/borrowck-borrow-overloaded-deref.rs:24:5
19 |
20 LL | &mut **x
21 | ^^^^^^^^ cannot borrow as mutable
22 |
23 = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `Rc<isize>`
24
25 error[E0596]: cannot borrow data in an `Rc` as mutable
26 --> $DIR/borrowck-borrow-overloaded-deref.rs:28:5
27 |
28 LL | &mut **x
29 | ^^^^^^^^ cannot borrow as mutable
30 |
31 = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `Rc<isize>`
32
33 error[E0594]: cannot assign to data in an `Rc`
34 --> $DIR/borrowck-borrow-overloaded-deref.rs:32:5
35 |
36 LL | *x = 3;
37 | ^^^^^^ cannot assign
38 |
39 = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `Rc<isize>`
40
41 error[E0594]: cannot assign to data in an `Rc`
42 --> $DIR/borrowck-borrow-overloaded-deref.rs:36:5
43 |
44 LL | **x = 3;
45 | ^^^^^^^ cannot assign
46 |
47 = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `Rc<isize>`
48
49 error[E0594]: cannot assign to data in an `Rc`
50 --> $DIR/borrowck-borrow-overloaded-deref.rs:40:5
51 |
52 LL | **x = 3;
53 | ^^^^^^^ cannot assign
54 |
55 = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `Rc<isize>`
56
57 error: aborting due to 7 previous errors
58
59 Some errors have detailed explanations: E0594, E0596.
60 For more information about an error, try `rustc --explain E0594`.