fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #71868 - Mark-Simulacrum:stable-1.43.1, r=pietroalbini8d69840ab92

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