1 error[E0515]: cannot return reference to local variable `x`
2 --> $DIR/polonius-smoke-test.rs:7:5
5 | ^^ returns a reference to data owned by the current function
7 error[E0503]: cannot use `x` because it was mutably borrowed
8 --> $DIR/polonius-smoke-test.rs:13:13
11 | ------ borrow of `x` occurs here
13 | ^ use of borrowed `x`
15 | - borrow later used here
17 error[E0505]: cannot move out of `x` because it is borrowed
18 --> $DIR/polonius-smoke-test.rs:19:13
21 | ------- borrow of `*x` occurs here
23 | ^ move out of `x` occurs here
25 | - borrow later used here
27 error[E0505]: cannot move out of `s` because it is borrowed
28 --> $DIR/polonius-smoke-test.rs:43:5
31 | ------- borrow of `*s` occurs here
32 LL | let tmp = foo(&r);
34 | ^ move out of `s` occurs here
36 | --- borrow later used here
38 error: aborting due to 4 previous errors
40 Some errors have detailed explanations: E0503, E0505, E0515.
41 For more information about an error, try `rustc --explain E0503`.