1 error[E0502]: cannot borrow `*x` as mutable because it is also borrowed as immutable
2 --> $DIR/borrowck-object-lifetime.rs:20:13
4 LL | let y = x.borrowed();
5 | ------------ immutable borrow occurs here
6 LL | let z = x.mut_borrowed();
7 | ^^^^^^^^^^^^^^^^ mutable borrow occurs here
9 | ----------- immutable borrow later used here
11 error[E0502]: cannot borrow `x` as mutable because it is also borrowed as immutable
12 --> $DIR/borrowck-object-lifetime.rs:26:13
14 LL | let y = x.borrowed();
15 | ------------ immutable borrow occurs here
17 | ^^^^^^ mutable borrow occurs here
19 | ----------- immutable borrow later used here
21 error: aborting due to 2 previous errors
23 For more information about this error, try `rustc --explain E0502`.