]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/borrowck-use-mut-borrow.stderr
Rollup merge of #57132 - daxpedda:master, r=steveklabnik
[rust.git] / src / test / ui / borrowck / borrowck-use-mut-borrow.stderr
1 error[E0503]: cannot use `x` because it was mutably borrowed
2   --> $DIR/borrowck-use-mut-borrow.rs:11:10
3    |
4 LL |     let p = &mut x;
5    |                  - borrow of `x` occurs here
6 LL |     drop(x); //~ ERROR cannot use `x` because it was mutably borrowed
7    |          ^ use of borrowed `x`
8
9 error[E0503]: cannot use `x` because it was mutably borrowed
10   --> $DIR/borrowck-use-mut-borrow.rs:18:10
11    |
12 LL |     let p = &mut x.a;
13    |                  --- borrow of `x.a` occurs here
14 LL |     drop(x); //~ ERROR cannot use `x` because it was mutably borrowed
15    |          ^ use of borrowed `x.a`
16
17 error[E0503]: cannot use `x.a` because it was mutably borrowed
18   --> $DIR/borrowck-use-mut-borrow.rs:25:10
19    |
20 LL |     let p = &mut x;
21    |                  - borrow of `x` occurs here
22 LL |     drop(x.a); //~ ERROR cannot use `x.a` because it was mutably borrowed
23    |          ^^^ use of borrowed `x`
24
25 error[E0503]: cannot use `x.a` because it was mutably borrowed
26   --> $DIR/borrowck-use-mut-borrow.rs:32:10
27    |
28 LL |     let p = &mut x.a;
29    |                  --- borrow of `x.a` occurs here
30 LL |     drop(x.a); //~ ERROR cannot use `x.a` because it was mutably borrowed
31    |          ^^^ use of borrowed `x.a`
32
33 error[E0503]: cannot use `x.a` because it was mutably borrowed
34   --> $DIR/borrowck-use-mut-borrow.rs:39:26
35    |
36 LL |     let p = &mut x;
37    |                  - borrow of `x` occurs here
38 LL |     let y = A { b: 3, .. x }; //~ ERROR cannot use `x.a` because it was mutably borrowed
39    |                          ^ use of borrowed `x`
40
41 error[E0503]: cannot use `x.a` because it was mutably borrowed
42   --> $DIR/borrowck-use-mut-borrow.rs:47:26
43    |
44 LL |     let p = &mut x.a;
45    |                  --- borrow of `x.a` occurs here
46 LL |     let y = A { b: 3, .. x }; //~ ERROR cannot use `x.a` because it was mutably borrowed
47    |                          ^ use of borrowed `x.a`
48
49 error[E0503]: cannot use `*x` because it was mutably borrowed
50   --> $DIR/borrowck-use-mut-borrow.rs:55:10
51    |
52 LL |     let p = &mut x;
53    |                  - borrow of `x` occurs here
54 LL |     drop(*x); //~ ERROR cannot use `*x` because it was mutably borrowed
55    |          ^^ use of borrowed `x`
56
57 error[E0503]: cannot use `*x.b` because it was mutably borrowed
58   --> $DIR/borrowck-use-mut-borrow.rs:62:10
59    |
60 LL |     let p = &mut x;
61    |                  - borrow of `x` occurs here
62 LL |     drop(*x.b); //~ ERROR cannot use `*x.b` because it was mutably borrowed
63    |          ^^^^ use of borrowed `x`
64
65 error[E0503]: cannot use `*x.b` because it was mutably borrowed
66   --> $DIR/borrowck-use-mut-borrow.rs:69:10
67    |
68 LL |     let p = &mut x.b;
69    |                  --- borrow of `x.b` occurs here
70 LL |     drop(*x.b); //~ ERROR cannot use `*x.b` because it was mutably borrowed
71    |          ^^^^ use of borrowed `x.b`
72
73 error: aborting due to 9 previous errors
74
75 For more information about this error, try `rustc --explain E0503`.