]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/polonius-smoke-test.stderr
fix merge conflicts
[rust.git] / src / test / ui / nll / polonius-smoke-test.stderr
1 error[E0515]: cannot return reference to local variable `x`
2   --> $DIR/polonius-smoke-test.rs:7:5
3    |
4 LL |     &x
5    |     ^^ returns a reference to data owned by the current function
6
7 error[E0503]: cannot use `x` because it was mutably borrowed
8   --> $DIR/polonius-smoke-test.rs:13:13
9    |
10 LL |     let y = &mut x;
11    |             ------ borrow of `x` occurs here
12 LL |     let z = x;
13    |             ^ use of borrowed `x`
14 LL |     let w = y;
15    |             - borrow later used here
16
17 error[E0505]: cannot move out of `x` because it is borrowed
18   --> $DIR/polonius-smoke-test.rs:19:13
19    |
20 LL |     let y = &mut *x;
21    |             ------- borrow of `*x` occurs here
22 LL |     let z = x;
23    |             ^ move out of `x` occurs here
24 LL |     y
25    |     - borrow later used here
26
27 error[E0505]: cannot move out of `s` because it is borrowed
28   --> $DIR/polonius-smoke-test.rs:43:5
29    |
30 LL |     let r = &mut *s;
31    |             ------- borrow of `*s` occurs here
32 LL |     let tmp = foo(&r);
33 LL |     s;
34    |     ^ move out of `s` occurs here
35 LL |     tmp;
36    |     --- borrow later used here
37
38 error: aborting due to 4 previous errors
39
40 Some errors have detailed explanations: E0503, E0505, E0515.
41 For more information about an error, try `rustc --explain E0503`.