]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/borrowck-borrow-overloaded-auto-deref.stderr
Rollup merge of #106470 - ehuss:tidy-no-wasm, r=Mark-Simulacrum
[rust.git] / tests / ui / borrowck / borrowck-borrow-overloaded-auto-deref.stderr
1 error[E0596]: cannot borrow data in an `Rc` as mutable
2   --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:36:19
3    |
4 LL |     let __isize = &mut x.y;
5    |                   ^^^^^^^^ cannot borrow as mutable
6    |
7    = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `Rc<Point>`
8
9 error[E0596]: cannot borrow data in an `Rc` as mutable
10   --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:40:19
11    |
12 LL |     let __isize = &mut x.y;
13    |                   ^^^^^^^^ cannot borrow as mutable
14    |
15    = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `Rc<Point>`
16
17 error[E0596]: cannot borrow data in an `Rc` as mutable
18   --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:48:5
19    |
20 LL |     &mut x.y
21    |     ^^^^^^^^ cannot borrow as mutable
22    |
23    = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `Rc<Point>`
24
25 error[E0596]: cannot borrow data in an `Rc` as mutable
26   --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:52:5
27    |
28 LL |     &mut x.y
29    |     ^^^^^^^^ cannot borrow as mutable
30    |
31    = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `Rc<Point>`
32
33 error[E0594]: cannot assign to data in an `Rc`
34   --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:56:5
35    |
36 LL |     x.y = 3;
37    |     ^^^^^^^ cannot assign
38    |
39    = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `Rc<Point>`
40
41 error[E0594]: cannot assign to data in an `Rc`
42   --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:60:5
43    |
44 LL |     x.y = 3;
45    |     ^^^^^^^ cannot assign
46    |
47    = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `Rc<Point>`
48
49 error[E0594]: cannot assign to data in an `Rc`
50   --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:64:5
51    |
52 LL |     x.y = 3;
53    |     ^^^^^^^ cannot assign
54    |
55    = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `Rc<Point>`
56
57 error[E0596]: cannot borrow data in an `Rc` as mutable
58   --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:72:5
59    |
60 LL |     x.set(0, 0);
61    |     ^^^^^^^^^^^ cannot borrow as mutable
62    |
63    = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `Rc<Point>`
64
65 error[E0596]: cannot borrow data in an `Rc` as mutable
66   --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:76:5
67    |
68 LL |     x.set(0, 0);
69    |     ^^^^^^^^^^^ cannot borrow as mutable
70    |
71    = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `Rc<Point>`
72
73 error[E0596]: cannot borrow data in an `Rc` as mutable
74   --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:84:5
75    |
76 LL |     x.y_mut()
77    |     ^^^^^^^^^ cannot borrow as mutable
78    |
79    = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `Rc<Point>`
80
81 error[E0596]: cannot borrow data in an `Rc` as mutable
82   --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:88:5
83    |
84 LL |     x.y_mut()
85    |     ^^^^^^^^^ cannot borrow as mutable
86    |
87    = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `Rc<Point>`
88
89 error[E0596]: cannot borrow data in an `Rc` as mutable
90   --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:92:6
91    |
92 LL |     *x.y_mut() = 3;
93    |      ^^^^^^^^^ cannot borrow as mutable
94    |
95    = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `Rc<Point>`
96
97 error[E0596]: cannot borrow data in an `Rc` as mutable
98   --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:96:6
99    |
100 LL |     *x.y_mut() = 3;
101    |      ^^^^^^^^^ cannot borrow as mutable
102    |
103    = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `Rc<Point>`
104
105 error[E0596]: cannot borrow data in an `Rc` as mutable
106   --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:100:6
107    |
108 LL |     *x.y_mut() = 3;
109    |      ^^^^^^^^^ cannot borrow as mutable
110    |
111    = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `Rc<Point>`
112
113 error: aborting due to 14 previous errors
114
115 Some errors have detailed explanations: E0594, E0596.
116 For more information about an error, try `rustc --explain E0594`.