]> git.proxmox.com Git - rustc.git/blob - src/test/ui/borrowck/borrowck-issue-14498.stderr
New upstream version 1.55.0+dfsg1
[rustc.git] / src / test / ui / borrowck / borrowck-issue-14498.stderr
1 error[E0594]: cannot assign to `***p`, which is behind a `&` reference
2 --> $DIR/borrowck-issue-14498.rs:16:5
3 |
4 LL | let p = &y;
5 | -- help: consider changing this to be a mutable reference: `&mut y`
6 LL | ***p = 2;
7 | ^^^^^^^^ `p` is a `&` reference, so the data it refers to cannot be written
8
9 error[E0506]: cannot assign to `**y` because it is borrowed
10 --> $DIR/borrowck-issue-14498.rs:25:5
11 |
12 LL | let p = &y;
13 | -- borrow of `**y` occurs here
14 LL | let q = &***p;
15 LL | **y = 2;
16 | ^^^^^^^ assignment to borrowed `**y` occurs here
17 LL | drop(p);
18 | - borrow later used here
19
20 error[E0506]: cannot assign to `**y` because it is borrowed
21 --> $DIR/borrowck-issue-14498.rs:35:5
22 |
23 LL | let p = &y;
24 | -- borrow of `**y` occurs here
25 LL | let q = &***p;
26 LL | **y = 2;
27 | ^^^^^^^ assignment to borrowed `**y` occurs here
28 LL | drop(p);
29 | - borrow later used here
30
31 error[E0506]: cannot assign to `**y` because it is borrowed
32 --> $DIR/borrowck-issue-14498.rs:45:5
33 |
34 LL | let p = &y;
35 | -- borrow of `**y` occurs here
36 LL | let q = &***p;
37 LL | **y = 2;
38 | ^^^^^^^ assignment to borrowed `**y` occurs here
39 LL | drop(p);
40 | - borrow later used here
41
42 error[E0506]: cannot assign to `**y` because it is borrowed
43 --> $DIR/borrowck-issue-14498.rs:55:5
44 |
45 LL | let p = &y;
46 | -- borrow of `**y` occurs here
47 LL | let q = &***p;
48 LL | **y = 2;
49 | ^^^^^^^ assignment to borrowed `**y` occurs here
50 LL | drop(p);
51 | - borrow later used here
52
53 error[E0506]: cannot assign to `**y.a` because it is borrowed
54 --> $DIR/borrowck-issue-14498.rs:65:5
55 |
56 LL | let p = &y.a;
57 | ---- borrow of `**y.a` occurs here
58 LL | let q = &***p;
59 LL | **y.a = 2;
60 | ^^^^^^^^^ assignment to borrowed `**y.a` occurs here
61 LL | drop(p);
62 | - borrow later used here
63
64 error[E0506]: cannot assign to `**y.a` because it is borrowed
65 --> $DIR/borrowck-issue-14498.rs:75:5
66 |
67 LL | let p = &y.a;
68 | ---- borrow of `**y.a` occurs here
69 LL | let q = &***p;
70 LL | **y.a = 2;
71 | ^^^^^^^^^ assignment to borrowed `**y.a` occurs here
72 LL | drop(p);
73 | - borrow later used here
74
75 error[E0506]: cannot assign to `**y.a` because it is borrowed
76 --> $DIR/borrowck-issue-14498.rs:85:5
77 |
78 LL | let p = &y.a;
79 | ---- borrow of `**y.a` occurs here
80 LL | let q = &***p;
81 LL | **y.a = 2;
82 | ^^^^^^^^^ assignment to borrowed `**y.a` occurs here
83 LL | drop(p);
84 | - borrow later used here
85
86 error[E0506]: cannot assign to `**y.a` because it is borrowed
87 --> $DIR/borrowck-issue-14498.rs:95:5
88 |
89 LL | let p = &y.a;
90 | ---- borrow of `**y.a` occurs here
91 LL | let q = &***p;
92 LL | **y.a = 2;
93 | ^^^^^^^^^ assignment to borrowed `**y.a` occurs here
94 LL | drop(p);
95 | - borrow later used here
96
97 error: aborting due to 9 previous errors
98
99 Some errors have detailed explanations: E0506, E0594.
100 For more information about an error, try `rustc --explain E0506`.