error[E0596]: cannot borrow immutable item `x` as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:63:24 | LL | let __isize = &mut x.y; //~ ERROR cannot borrow | ^ cannot borrow as mutable error[E0596]: cannot borrow immutable item `*x` as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:75:10 | LL | &mut x.y //~ ERROR cannot borrow | ^ cannot borrow as mutable error[E0596]: cannot borrow immutable item `x` as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:98:5 | LL | x.y = 3; //~ ERROR cannot borrow | ^ cannot borrow as mutable error[E0596]: cannot borrow immutable item `*x` as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:102:5 | LL | x.y = 3; //~ ERROR cannot borrow | ^ cannot borrow as mutable error[E0596]: cannot borrow immutable item `x` as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:119:5 | LL | x.set(0, 0); //~ ERROR cannot borrow | ^ cannot borrow as mutable error[E0596]: cannot borrow immutable item `*x` as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:131:5 | LL | x.y_mut() //~ ERROR cannot borrow | ^ cannot borrow as mutable error[E0596]: cannot borrow immutable item `x` as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:139:6 | LL | *x.y_mut() = 3; //~ ERROR cannot borrow | ^ cannot borrow as mutable error[E0596]: cannot borrow immutable item `*x` as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:143:6 | LL | *x.y_mut() = 3; //~ ERROR cannot borrow | ^ cannot borrow as mutable error: aborting due to 8 previous errors For more information about this error, try `rustc --explain E0596`.