1 error[E0506]: cannot assign to `p.x` because it is borrowed
2 --> $DIR/borrowck-assign-comp.rs:13:5
5 | -- borrow of `p.x` occurs here
7 LL | p.x = 5; //[ast]~ ERROR cannot assign to `p.x`
8 | ^^^^^^^ assignment to borrowed `p.x` occurs here
9 LL | //[mir]~^ ERROR cannot assign to `p.x` because it is borrowed
11 | --- borrow later used here
13 error[E0506]: cannot assign to `p` because it is borrowed
14 --> $DIR/borrowck-assign-comp.rs:24:5
17 | ---- borrow of `p` occurs here
18 LL | p = Point {x: 5, y: 7};//[ast]~ ERROR cannot assign to `p`
19 | ^^^^^^^^^^^^^^^^^^^^^^ assignment to borrowed `p` occurs here
21 LL | *q; // stretch loan
22 | -- borrow later used here
24 error[E0506]: cannot assign to `p.y` because it is borrowed
25 --> $DIR/borrowck-assign-comp.rs:36:5
28 | ---- borrow of `p.y` occurs here
29 LL | p.y = 5; //[ast]~ ERROR cannot assign to `p.y`
30 | ^^^^^^^ assignment to borrowed `p.y` occurs here
31 LL | //[mir]~^ ERROR cannot assign to `p.y` because it is borrowed
33 | -- borrow later used here
35 error: aborting due to 3 previous errors
37 For more information about this error, try `rustc --explain E0506`.