fork/rust

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

borsAuto merge of #69854 - pietroalbini:stable-next, r=Centrilb8cedc00407

1.42.0
2.2 KiB60 linesraw
1error[E0596]: cannot borrow data in an `Rc` as mutable
2  --> $DIR/borrowck-borrow-overloaded-deref.rs:12:19
3   |
4LL |     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 `std::rc::Rc<isize>`
8
9error[E0596]: cannot borrow data in an `Rc` as mutable
10  --> $DIR/borrowck-borrow-overloaded-deref.rs:16:19
11   |
12LL |     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 `std::rc::Rc<isize>`
16
17error[E0596]: cannot borrow data in an `Rc` as mutable
18  --> $DIR/borrowck-borrow-overloaded-deref.rs:24:5
19   |
20LL |     &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 `std::rc::Rc<isize>`
24
25error[E0596]: cannot borrow data in an `Rc` as mutable
26  --> $DIR/borrowck-borrow-overloaded-deref.rs:28:5
27   |
28LL |     &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 `std::rc::Rc<isize>`
32
33error[E0594]: cannot assign to data in an `Rc`
34  --> $DIR/borrowck-borrow-overloaded-deref.rs:32:5
35   |
36LL |     *x = 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<isize>`
40
41error[E0594]: cannot assign to data in an `Rc`
42  --> $DIR/borrowck-borrow-overloaded-deref.rs:36:5
43   |
44LL |     **x = 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<isize>`
48
49error[E0594]: cannot assign to data in an `Rc`
50  --> $DIR/borrowck-borrow-overloaded-deref.rs:40:5
51   |
52LL |     **x = 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<isize>`
56
57error: aborting due to 7 previous errors
58
59Some errors have detailed explanations: E0594, E0596.
60For more information about an error, try `rustc --explain E0594`.