1
1
error[E0506]: cannot assign to `x` because it is borrowed
2
- --> $DIR/super-let.rs:30:28
2
+ --> $DIR/super-let-lifetime-and-drop .rs:30:28
3
3
|
4
4
LL | super let b = DropMe(&mut x);
5
5
| ------ `x` is borrowed here
11
11
| - borrow might be used here, when `b` is dropped and runs the `Drop` code for type `DropMe`
12
12
13
13
error[E0506]: cannot assign to `x` because it is borrowed
14
- --> $DIR/super-let.rs:46:28
14
+ --> $DIR/super-let-lifetime-and-drop .rs:46:28
15
15
|
16
16
LL | super let b = &DropMe(&mut x);
17
17
| --------------
26
26
| - ... and the borrow might be used here, when that temporary is dropped and runs the `Drop` code for type `DropMe`
27
27
28
28
error[E0506]: cannot assign to `x` because it is borrowed
29
- --> $DIR/super-let.rs:64:32
29
+ --> $DIR/super-let-lifetime-and-drop .rs:64:32
30
30
|
31
31
LL | super let b = identity(&DropMe(&mut x));
32
32
| --------------
@@ -40,7 +40,7 @@ LL | };
40
40
| - ... and the borrow might be used here, when that temporary is dropped and runs the `Drop` code for type `DropMe`
41
41
42
42
error[E0506]: cannot assign to `x` because it is borrowed
43
- --> $DIR/super-let.rs:87:36
43
+ --> $DIR/super-let-lifetime-and-drop .rs:87:36
44
44
|
45
45
LL | super let b = identity(&DropMe(&mut x));
46
46
| --------------
@@ -55,7 +55,7 @@ LL | ));
55
55
| - ... and the borrow might be used here, when that temporary is dropped and runs the `Drop` code for type `DropMe`
56
56
57
57
error[E0506]: cannot assign to `x` because it is borrowed
58
- --> $DIR/super-let.rs:107:28
58
+ --> $DIR/super-let-lifetime-and-drop .rs:107:28
59
59
|
60
60
LL | super let b = DropMe(&mut x);
61
61
| ------ `x` is borrowed here
67
67
| - borrow might be used here, when `b` is dropped and runs the `Drop` code for type `DropMe`
68
68
69
69
error[E0506]: cannot assign to `x` because it is borrowed
70
- --> $DIR/super-let.rs:125:28
70
+ --> $DIR/super-let-lifetime-and-drop .rs:125:28
71
71
|
72
72
LL | super let b = DropMe(&mut x);
73
73
| ------ `x` is borrowed here
79
79
| - borrow might be used here, when `b` is dropped and runs the `Drop` code for type `DropMe`
80
80
81
81
error[E0506]: cannot assign to `x` because it is borrowed
82
- --> $DIR/super-let.rs:143:28
82
+ --> $DIR/super-let-lifetime-and-drop .rs:143:28
83
83
|
84
84
LL | super let b = DropMe(&mut x);
85
85
| ------ `x` is borrowed here
91
91
| - borrow might be used here, when `b` is dropped and runs the `Drop` code for type `DropMe`
92
92
93
93
error[E0506]: cannot assign to `x` because it is borrowed
94
- --> $DIR/super-let.rs:159:28
94
+ --> $DIR/super-let-lifetime-and-drop .rs:159:28
95
95
|
96
96
LL | b = DropMe(&mut x);
97
97
| ------ `x` is borrowed here
@@ -102,7 +102,7 @@ LL | drop(a);
102
102
| - borrow later used here
103
103
104
104
error[E0716]: temporary value dropped while borrowed
105
- --> $DIR/super-let.rs:172:33
105
+ --> $DIR/super-let-lifetime-and-drop .rs:172:33
106
106
|
107
107
LL | #[cfg(borrowck)] { a = &String::from("asdf"); };
108
108
| ^^^^^^^^^^^^^^^^^^^^- temporary value is freed at the end of this statement
@@ -115,7 +115,7 @@ LL | let _ = a;
115
115
= note: consider using a `let` binding to create a longer lived value
116
116
117
117
error[E0506]: cannot assign to `x` because it is borrowed
118
- --> $DIR/super-let.rs:206:28
118
+ --> $DIR/super-let-lifetime-and-drop .rs:206:28
119
119
|
120
120
LL | super let d = &DropMe(&mut x);
121
121
| --------------
@@ -130,7 +130,7 @@ LL | }
130
130
| - ... and the borrow might be used here, when that temporary is dropped and runs the `Drop` code for type `DropMe`
131
131
132
132
error[E0506]: cannot assign to `x` because it is borrowed
133
- --> $DIR/super-let.rs:227:32
133
+ --> $DIR/super-let-lifetime-and-drop .rs:227:32
134
134
|
135
135
LL | super let d = identity(&DropMe(&mut x));
136
136
| --------------
@@ -145,7 +145,7 @@ LL | };
145
145
| - ... and the borrow might be used here, when that temporary is dropped and runs the `Drop` code for type `DropMe`
146
146
147
147
error[E0506]: cannot assign to `x` because it is borrowed
148
- --> $DIR/super-let.rs:246:28
148
+ --> $DIR/super-let-lifetime-and-drop .rs:246:28
149
149
|
150
150
LL | super let b = DropMe(&mut x);
151
151
| ------ `x` is borrowed here
@@ -157,7 +157,7 @@ LL | }
157
157
| - borrow might be used here, when `b` is dropped and runs the `Drop` code for type `DropMe`
158
158
159
159
error[E0506]: cannot assign to `x` because it is borrowed
160
- --> $DIR/super-let.rs:263:28
160
+ --> $DIR/super-let-lifetime-and-drop .rs:263:28
161
161
|
162
162
LL | let dropme = Some(DropMe(&mut x));
163
163
| ------ `x` is borrowed here
0 commit comments