1 error[E0506]: cannot assign to `i` because it is borrowed
2 --> $DIR/try-block-maybe-bad-lifetime.rs:27:9
5 | -- borrow of `i` occurs here
7 LL | i = 0; //~ ERROR cannot assign to `i` because it is borrowed
8 | ^^^^^ assignment to borrowed `i` occurs here
10 LL | do_something_with(x);
11 | - borrow later used here
13 error[E0382]: borrow of moved value: `x`
14 --> $DIR/try-block-maybe-bad-lifetime.rs:38:24
16 LL | ::std::mem::drop(x);
19 LL | println!("{}", x); //~ ERROR borrow of moved value: `x`
20 | ^ value borrowed here after move
22 = note: move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait
24 error[E0506]: cannot assign to `i` because it is borrowed
25 --> $DIR/try-block-maybe-bad-lifetime.rs:50:9
28 | -- borrow of `i` occurs here
30 LL | i = 0; //~ ERROR cannot assign to `i` because it is borrowed
31 | ^^^^^ assignment to borrowed `i` occurs here
33 LL | do_something_with(j);
34 | - borrow later used here
36 error: aborting due to 3 previous errors
38 Some errors occurred: E0382, E0506.
39 For more information about an error, try `rustc --explain E0382`.