File: super-let.borrowck.stderr

package info (click to toggle)
rustc 1.88.0%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 934,128 kB
  • sloc: xml: 158,127; python: 36,062; javascript: 19,855; sh: 19,700; cpp: 18,947; ansic: 12,993; asm: 4,792; makefile: 690; lisp: 29; perl: 29; ruby: 19; sql: 11
file content (174 lines) | stat: -rw-r--r-- 7,516 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
error[E0506]: cannot assign to `x` because it is borrowed
  --> $DIR/super-let.rs:30:28
   |
LL |             super let b = DropMe(&mut x);
   |                                  ------ `x` is borrowed here
...
LL |         #[cfg(borrowck)] { x = true; }
   |                            ^^^^^^^^ `x` is assigned to here but it was already borrowed
...
LL |     }
   |     - borrow might be used here, when `b` is dropped and runs the `Drop` code for type `DropMe`

error[E0506]: cannot assign to `x` because it is borrowed
  --> $DIR/super-let.rs:46:28
   |
LL |             super let b = &DropMe(&mut x);
   |                            --------------
   |                            |      |
   |                            |      `x` is borrowed here
   |                            a temporary with access to the borrow is created here ...
...
LL |         #[cfg(borrowck)] { x = true; }
   |                            ^^^^^^^^ `x` is assigned to here but it was already borrowed
...
LL |     }
   |     - ... and the borrow might be used here, when that temporary is dropped and runs the `Drop` code for type `DropMe`

error[E0506]: cannot assign to `x` because it is borrowed
  --> $DIR/super-let.rs:64:32
   |
LL |             super let b = identity(&DropMe(&mut x));
   |                                     --------------
   |                                     |      |
   |                                     |      `x` is borrowed here
   |                                     a temporary with access to the borrow is created here ...
LL |             #[cfg(borrowck)] { x = true; }
   |                                ^^^^^^^^ `x` is assigned to here but it was already borrowed
...
LL |         };
   |          - ... and the borrow might be used here, when that temporary is dropped and runs the `Drop` code for type `DropMe`

error[E0506]: cannot assign to `x` because it is borrowed
  --> $DIR/super-let.rs:87:36
   |
LL |                 super let b = identity(&DropMe(&mut x));
   |                                         --------------
   |                                         |      |
   |                                         |      `x` is borrowed here
   |                                         a temporary with access to the borrow is created here ...
...
LL |                 #[cfg(borrowck)] { x = true; }
   |                                    ^^^^^^^^ `x` is assigned to here but it was already borrowed
...
LL |         ));
   |           - ... and the borrow might be used here, when that temporary is dropped and runs the `Drop` code for type `DropMe`

error[E0506]: cannot assign to `x` because it is borrowed
  --> $DIR/super-let.rs:107:28
   |
LL |                 super let b = DropMe(&mut x);
   |                                      ------ `x` is borrowed here
...
LL |         #[cfg(borrowck)] { x = true; }
   |                            ^^^^^^^^ `x` is assigned to here but it was already borrowed
...
LL |     }
   |     - borrow might be used here, when `b` is dropped and runs the `Drop` code for type `DropMe`

error[E0506]: cannot assign to `x` because it is borrowed
  --> $DIR/super-let.rs:125:28
   |
LL |             super let b = DropMe(&mut x);
   |                                  ------ `x` is borrowed here
...
LL |         #[cfg(borrowck)] { x = true; }
   |                            ^^^^^^^^ `x` is assigned to here but it was already borrowed
...
LL |     }
   |     - borrow might be used here, when `b` is dropped and runs the `Drop` code for type `DropMe`

error[E0506]: cannot assign to `x` because it is borrowed
  --> $DIR/super-let.rs:143:28
   |
LL |             super let b = DropMe(&mut x);
   |                                  ------ `x` is borrowed here
...
LL |         #[cfg(borrowck)] { x = true; }
   |                            ^^^^^^^^ `x` is assigned to here but it was already borrowed
...
LL |     }
   |     - borrow might be used here, when `b` is dropped and runs the `Drop` code for type `DropMe`

error[E0506]: cannot assign to `x` because it is borrowed
  --> $DIR/super-let.rs:159:28
   |
LL |             b = DropMe(&mut x);
   |                        ------ `x` is borrowed here
...
LL |         #[cfg(borrowck)] { x = true; }
   |                            ^^^^^^^^ `x` is assigned to here but it was already borrowed
LL |         drop(a);
   |              - borrow later used here

error[E0716]: temporary value dropped while borrowed
  --> $DIR/super-let.rs:172:33
   |
LL |         #[cfg(borrowck)] { a = &String::from("asdf"); };
   |                                 ^^^^^^^^^^^^^^^^^^^^- temporary value is freed at the end of this statement
   |                                 |
   |                                 creates a temporary value which is freed while still in use
...
LL |         let _ = a;
   |                 - borrow later used here
   |
   = note: consider using a `let` binding to create a longer lived value

error[E0506]: cannot assign to `x` because it is borrowed
  --> $DIR/super-let.rs:206:28
   |
LL |                     super let d = &DropMe(&mut x);
   |                                    --------------
   |                                    |      |
   |                                    |      `x` is borrowed here
   |                                    a temporary with access to the borrow is created here ...
...
LL |         #[cfg(borrowck)] { x = true; }
   |                            ^^^^^^^^ `x` is assigned to here but it was already borrowed
...
LL |     }
   |     - ... and the borrow might be used here, when that temporary is dropped and runs the `Drop` code for type `DropMe`

error[E0506]: cannot assign to `x` because it is borrowed
  --> $DIR/super-let.rs:227:32
   |
LL |                     super let d = identity(&DropMe(&mut x));
   |                                             --------------
   |                                             |      |
   |                                             |      `x` is borrowed here
   |                                             a temporary with access to the borrow is created here ...
...
LL |             #[cfg(borrowck)] { x = true; }
   |                                ^^^^^^^^ `x` is assigned to here but it was already borrowed
...
LL |         };
   |          - ... and the borrow might be used here, when that temporary is dropped and runs the `Drop` code for type `DropMe`

error[E0506]: cannot assign to `x` because it is borrowed
  --> $DIR/super-let.rs:246:28
   |
LL |             super let b = DropMe(&mut x);
   |                                  ------ `x` is borrowed here
...
LL |         #[cfg(borrowck)] { x = true; }
   |                            ^^^^^^^^ `x` is assigned to here but it was already borrowed
...
LL |     }
   |     - borrow might be used here, when `b` is dropped and runs the `Drop` code for type `DropMe`

error[E0506]: cannot assign to `x` because it is borrowed
  --> $DIR/super-let.rs:263:28
   |
LL |             let dropme = Some(DropMe(&mut x));
   |                                      ------ `x` is borrowed here
...
LL |         #[cfg(borrowck)] { x = true; }
   |                            ^^^^^^^^ `x` is assigned to here but it was already borrowed
...
LL |     }
   |     - borrow might be used here, when `x` is dropped and runs the `Drop` code for type `DropMe`

error: aborting due to 13 previous errors

Some errors have detailed explanations: E0506, E0716.
For more information about an error, try `rustc --explain E0506`.