1 error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable
2 --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:53:24
4 LL | let __isize = &mut x.y;
5 | ^ cannot borrow as mutable
7 help: consider changing this to be mutable
9 LL | fn deref_mut_field1(mut x: Own<Point>) {
12 error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference
13 --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:65:10
16 | ^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable
18 help: consider changing this to be a mutable reference
20 LL | fn deref_extend_mut_field1(x: &mut Own<Point>) -> &mut isize {
23 error[E0499]: cannot borrow `*x` as mutable more than once at a time
24 --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:78:19
26 LL | let _x = &mut x.x;
27 | - first mutable borrow occurs here
28 LL | let _y = &mut x.y;
29 | ^ second mutable borrow occurs here
31 | -- first borrow later used here
33 error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable
34 --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:88:5
37 | ^ cannot borrow as mutable
39 help: consider changing this to be mutable
41 LL | fn assign_field1<'a>(mut x: Own<Point>) {
44 error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference
45 --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:92:5
48 | ^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable
50 help: consider changing this to be a mutable reference
52 LL | fn assign_field2<'a>(x: &'a mut Own<Point>) {
55 error[E0499]: cannot borrow `*x` as mutable more than once at a time
56 --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:101:5
58 LL | let _p: &mut Point = &mut **x;
59 | -- first mutable borrow occurs here
61 | ^ second mutable borrow occurs here
63 | -- first borrow later used here
65 error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable
66 --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:109:5
69 | ^^^^^^^^^^^ cannot borrow as mutable
71 help: consider changing this to be mutable
73 LL | fn deref_mut_method1(mut x: Own<Point>) {
76 error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference
77 --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:121:5
80 | ^^^^^^^^^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable
82 help: consider changing this to be a mutable reference
84 LL | fn deref_extend_mut_method1(x: &mut Own<Point>) -> &mut isize {
87 error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable
88 --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:129:6
91 | ^^^^^^^^^ cannot borrow as mutable
93 help: consider changing this to be mutable
95 LL | fn assign_method1<'a>(mut x: Own<Point>) {
98 error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference
99 --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:133:6
102 | ^^^^^^^^^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable
104 help: consider changing this to be a mutable reference
106 LL | fn assign_method2<'a>(x: &'a mut Own<Point>) {
109 error: aborting due to 10 previous errors
111 Some errors have detailed explanations: E0499, E0596.
112 For more information about an error, try `rustc --explain E0499`.