fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #71868 - Mark-Simulacrum:stable-1.43.1, r=pietroalbini8d69840ab92

1.43.1
4.4 KiB116 linesraw
1error[E0596]: cannot borrow data in an `Rc` as mutable
2  --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:36:19
3   |
4LL |     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 `std::rc::Rc<Point>`
8
9error[E0596]: cannot borrow data in an `Rc` as mutable
10  --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:40:19
11   |
12LL |     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 `std::rc::Rc<Point>`
16
17error[E0596]: cannot borrow data in an `Rc` as mutable
18  --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:48:5
19   |
20LL |     &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 `std::rc::Rc<Point>`
24
25error[E0596]: cannot borrow data in an `Rc` as mutable
26  --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:52:5
27   |
28LL |     &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 `std::rc::Rc<Point>`
32
33error[E0594]: cannot assign to data in an `Rc`
34  --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:56:5
35   |
36LL |     x.y = 3;
37   |     ^^^^^^^ cannot assign
38   |
39   = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `std::rc::Rc<Point>`
40
41error[E0594]: cannot assign to data in an `Rc`
42  --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:60:5
43   |
44LL |     x.y = 3;
45   |     ^^^^^^^ cannot assign
46   |
47   = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `std::rc::Rc<Point>`
48
49error[E0594]: cannot assign to data in an `Rc`
50  --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:64:5
51   |
52LL |     x.y = 3;
53   |     ^^^^^^^ cannot assign
54   |
55   = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `std::rc::Rc<Point>`
56
57error[E0596]: cannot borrow data in an `Rc` as mutable
58  --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:72:5
59   |
60LL |     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 `std::rc::Rc<Point>`
64
65error[E0596]: cannot borrow data in an `Rc` as mutable
66  --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:76:5
67   |
68LL |     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 `std::rc::Rc<Point>`
72
73error[E0596]: cannot borrow data in an `Rc` as mutable
74  --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:84:5
75   |
76LL |     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 `std::rc::Rc<Point>`
80
81error[E0596]: cannot borrow data in an `Rc` as mutable
82  --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:88:5
83   |
84LL |     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 `std::rc::Rc<Point>`
88
89error[E0596]: cannot borrow data in an `Rc` as mutable
90  --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:92:6
91   |
92LL |     *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 `std::rc::Rc<Point>`
96
97error[E0596]: cannot borrow data in an `Rc` as mutable
98  --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:96:6
99   |
100LL |     *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 `std::rc::Rc<Point>`
104
105error[E0596]: cannot borrow data in an `Rc` as mutable
106  --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:100:6
107   |
108LL |     *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 `std::rc::Rc<Point>`
112
113error: aborting due to 14 previous errors
114
115Some errors have detailed explanations: E0594, E0596.
116For more information about an error, try `rustc --explain E0594`.