1 error[E0506]: cannot assign to `p.x` because it is borrowed
2 --> $DIR/borrowck-assign-comp.rs:10:5
5 | -- borrow of `p.x` occurs here
8 | ^^^^^^^ assignment to borrowed `p.x` occurs here
10 | --- borrow later used here
12 error[E0506]: cannot assign to `p` because it is borrowed
13 --> $DIR/borrowck-assign-comp.rs:20:5
16 | ---- borrow of `p` occurs here
17 LL | p = Point {x: 5, y: 7};
18 | ^^^^^^^^^^^^^^^^^^^^^^ assignment to borrowed `p` occurs here
19 LL | p.x; // silence warning
20 LL | *q; // stretch loan
21 | -- borrow later used here
23 error[E0506]: cannot assign to `p.y` because it is borrowed
24 --> $DIR/borrowck-assign-comp.rs:31:5
27 | ---- borrow of `p.y` occurs here
29 | ^^^^^^^ assignment to borrowed `p.y` occurs here
31 | -- borrow later used here
33 error: aborting due to 3 previous errors
35 For more information about this error, try `rustc --explain E0506`.