2018-08-08 07:28:26 -05:00
|
|
|
error[E0596]: cannot borrow field of immutable binding as mutable
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/borrowck-borrow-overloaded-auto-deref.rs:47:24
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | let __isize = &mut x.y; //~ ERROR cannot borrow
|
|
|
|
| ^^^ cannot mutably borrow field of immutable binding
|
|
|
|
|
|
|
|
error[E0596]: cannot borrow field of immutable binding as mutable
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/borrowck-borrow-overloaded-auto-deref.rs:51:24
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | let __isize = &mut x.y; //~ ERROR cannot borrow
|
|
|
|
| ^^^ cannot mutably borrow field of immutable binding
|
|
|
|
|
|
|
|
error[E0596]: cannot borrow field of immutable binding as mutable
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/borrowck-borrow-overloaded-auto-deref.rs:59:10
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | &mut x.y //~ ERROR cannot borrow
|
|
|
|
| ^^^ cannot mutably borrow field of immutable binding
|
|
|
|
|
|
|
|
error[E0596]: cannot borrow field of immutable binding as mutable
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/borrowck-borrow-overloaded-auto-deref.rs:63:10
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | &mut x.y //~ ERROR cannot borrow
|
|
|
|
| ^^^ cannot mutably borrow field of immutable binding
|
|
|
|
|
|
|
|
error[E0594]: cannot assign to field of immutable binding
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/borrowck-borrow-overloaded-auto-deref.rs:67:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | x.y = 3; //~ ERROR cannot assign
|
|
|
|
| ^^^^^^^ cannot mutably borrow field of immutable binding
|
|
|
|
|
|
|
|
error[E0594]: cannot assign to field of immutable binding
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/borrowck-borrow-overloaded-auto-deref.rs:71:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | x.y = 3; //~ ERROR cannot assign
|
|
|
|
| ^^^^^^^ cannot mutably borrow field of immutable binding
|
|
|
|
|
|
|
|
error[E0594]: cannot assign to field of immutable binding
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/borrowck-borrow-overloaded-auto-deref.rs:75:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | x.y = 3; //~ ERROR cannot assign
|
|
|
|
| ^^^^^^^ cannot mutably borrow field of immutable binding
|
|
|
|
|
|
|
|
error[E0596]: cannot borrow immutable borrowed content as mutable
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/borrowck-borrow-overloaded-auto-deref.rs:83:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | x.set(0, 0); //~ ERROR cannot borrow
|
|
|
|
| ^ cannot borrow as mutable
|
|
|
|
|
|
|
|
error[E0596]: cannot borrow immutable borrowed content as mutable
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/borrowck-borrow-overloaded-auto-deref.rs:87:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | x.set(0, 0); //~ ERROR cannot borrow
|
|
|
|
| ^ cannot borrow as mutable
|
|
|
|
|
|
|
|
error[E0596]: cannot borrow immutable borrowed content as mutable
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/borrowck-borrow-overloaded-auto-deref.rs:95:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | x.y_mut() //~ ERROR cannot borrow
|
|
|
|
| ^ cannot borrow as mutable
|
|
|
|
|
|
|
|
error[E0596]: cannot borrow immutable borrowed content as mutable
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/borrowck-borrow-overloaded-auto-deref.rs:99:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | x.y_mut() //~ ERROR cannot borrow
|
|
|
|
| ^ cannot borrow as mutable
|
|
|
|
|
|
|
|
error[E0596]: cannot borrow immutable borrowed content as mutable
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/borrowck-borrow-overloaded-auto-deref.rs:103:6
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | *x.y_mut() = 3; //~ ERROR cannot borrow
|
|
|
|
| ^ cannot borrow as mutable
|
|
|
|
|
|
|
|
error[E0596]: cannot borrow immutable borrowed content as mutable
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/borrowck-borrow-overloaded-auto-deref.rs:107:6
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | *x.y_mut() = 3; //~ ERROR cannot borrow
|
|
|
|
| ^ cannot borrow as mutable
|
|
|
|
|
|
|
|
error[E0596]: cannot borrow immutable borrowed content as mutable
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/borrowck-borrow-overloaded-auto-deref.rs:111:6
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | *x.y_mut() = 3; //~ ERROR cannot borrow
|
|
|
|
| ^ cannot borrow as mutable
|
|
|
|
|
|
|
|
error: aborting due to 14 previous errors
|
|
|
|
|
|
|
|
Some errors occurred: E0594, E0596.
|
|
|
|
For more information about an error, try `rustc --explain E0594`.
|