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