@@ -105,6 +105,50 @@ LL | }
105
105
error[E0716]: temporary value dropped while borrowed
106
106
--> $DIR/promote-not.rs:52:29
107
107
|
108
+ LL | let _val: &'static _ = &((1+1)/(1-1));
109
+ | ---------- ^^^^^^^^^^^^^ creates a temporary value which is freed while still in use
110
+ | |
111
+ | type annotation requires that borrow lasts for `'static`
112
+ ...
113
+ LL | }
114
+ | - temporary value is freed at the end of this statement
115
+
116
+ error[E0716]: temporary value dropped while borrowed
117
+ --> $DIR/promote-not.rs:53:29
118
+ |
119
+ LL | let _val: &'static _ = &(i32::MIN/-1);
120
+ | ---------- ^^^^^^^^^^^^^ creates a temporary value which is freed while still in use
121
+ | |
122
+ | type annotation requires that borrow lasts for `'static`
123
+ ...
124
+ LL | }
125
+ | - temporary value is freed at the end of this statement
126
+
127
+ error[E0716]: temporary value dropped while borrowed
128
+ --> $DIR/promote-not.rs:54:29
129
+ |
130
+ LL | let _val: &'static _ = &(i32::MIN/(0-1));
131
+ | ---------- ^^^^^^^^^^^^^^^^ creates a temporary value which is freed while still in use
132
+ | |
133
+ | type annotation requires that borrow lasts for `'static`
134
+ ...
135
+ LL | }
136
+ | - temporary value is freed at the end of this statement
137
+
138
+ error[E0716]: temporary value dropped while borrowed
139
+ --> $DIR/promote-not.rs:55:29
140
+ |
141
+ LL | let _val: &'static _ = &(-128i8/-1);
142
+ | ---------- ^^^^^^^^^^^ creates a temporary value which is freed while still in use
143
+ | |
144
+ | type annotation requires that borrow lasts for `'static`
145
+ ...
146
+ LL | }
147
+ | - temporary value is freed at the end of this statement
148
+
149
+ error[E0716]: temporary value dropped while borrowed
150
+ --> $DIR/promote-not.rs:56:29
151
+ |
108
152
LL | let _val: &'static _ = &(1%0);
109
153
| ---------- ^^^^^ creates a temporary value which is freed while still in use
110
154
| |
@@ -114,7 +158,7 @@ LL | }
114
158
| - temporary value is freed at the end of this statement
115
159
116
160
error[E0716]: temporary value dropped while borrowed
117
- --> $DIR/promote-not.rs:53 :29
161
+ --> $DIR/promote-not.rs:57 :29
118
162
|
119
163
LL | let _val: &'static _ = &(1%(1-1));
120
164
| ---------- ^^^^^^^^^ creates a temporary value which is freed while still in use
@@ -125,7 +169,7 @@ LL | }
125
169
| - temporary value is freed at the end of this statement
126
170
127
171
error[E0716]: temporary value dropped while borrowed
128
- --> $DIR/promote-not.rs:54 :29
172
+ --> $DIR/promote-not.rs:58 :29
129
173
|
130
174
LL | let _val: &'static _ = &([1,2,3][4]+1);
131
175
| ---------- ^^^^^^^^^^^^^^ creates a temporary value which is freed while still in use
@@ -136,7 +180,7 @@ LL | }
136
180
| - temporary value is freed at the end of this statement
137
181
138
182
error[E0716]: temporary value dropped while borrowed
139
- --> $DIR/promote-not.rs:57 :29
183
+ --> $DIR/promote-not.rs:61 :29
140
184
|
141
185
LL | let _val: &'static _ = &TEST_DROP;
142
186
| ---------- ^^^^^^^^^ creates a temporary value which is freed while still in use
@@ -147,7 +191,7 @@ LL | }
147
191
| - temporary value is freed at the end of this statement
148
192
149
193
error[E0716]: temporary value dropped while borrowed
150
- --> $DIR/promote-not.rs:59 :29
194
+ --> $DIR/promote-not.rs:63 :29
151
195
|
152
196
LL | let _val: &'static _ = &&TEST_DROP;
153
197
| ---------- ^^^^^^^^^^ creates a temporary value which is freed while still in use
@@ -158,7 +202,7 @@ LL | }
158
202
| - temporary value is freed at the end of this statement
159
203
160
204
error[E0716]: temporary value dropped while borrowed
161
- --> $DIR/promote-not.rs:59 :30
205
+ --> $DIR/promote-not.rs:63 :30
162
206
|
163
207
LL | let _val: &'static _ = &&TEST_DROP;
164
208
| ---------- ^^^^^^^^^ creates a temporary value which is freed while still in use
@@ -169,7 +213,7 @@ LL | }
169
213
| - temporary value is freed at the end of this statement
170
214
171
215
error[E0716]: temporary value dropped while borrowed
172
- --> $DIR/promote-not.rs:62 :29
216
+ --> $DIR/promote-not.rs:66 :29
173
217
|
174
218
LL | let _val: &'static _ = &(&TEST_DROP,);
175
219
| ---------- ^^^^^^^^^^^^^ creates a temporary value which is freed while still in use
@@ -180,7 +224,7 @@ LL | }
180
224
| - temporary value is freed at the end of this statement
181
225
182
226
error[E0716]: temporary value dropped while borrowed
183
- --> $DIR/promote-not.rs:62 :31
227
+ --> $DIR/promote-not.rs:66 :31
184
228
|
185
229
LL | let _val: &'static _ = &(&TEST_DROP,);
186
230
| ---------- ^^^^^^^^^ creates a temporary value which is freed while still in use
@@ -191,7 +235,7 @@ LL | }
191
235
| - temporary value is freed at the end of this statement
192
236
193
237
error[E0716]: temporary value dropped while borrowed
194
- --> $DIR/promote-not.rs:65 :29
238
+ --> $DIR/promote-not.rs:69 :29
195
239
|
196
240
LL | let _val: &'static _ = &[&TEST_DROP; 1];
197
241
| ---------- ^^^^^^^^^^^^^^^ creates a temporary value which is freed while still in use
@@ -202,14 +246,14 @@ LL | }
202
246
| - temporary value is freed at the end of this statement
203
247
204
248
error[E0716]: temporary value dropped while borrowed
205
- --> $DIR/promote-not.rs:65 :31
249
+ --> $DIR/promote-not.rs:69 :31
206
250
|
207
251
LL | let _val: &'static _ = &[&TEST_DROP; 1];
208
252
| ---------- ^^^^^^^^^ - temporary value is freed at the end of this statement
209
253
| | |
210
254
| | creates a temporary value which is freed while still in use
211
255
| type annotation requires that borrow lasts for `'static`
212
256
213
- error: aborting due to 20 previous errors
257
+ error: aborting due to 24 previous errors
214
258
215
259
For more information about this error, try `rustc --explain E0716`.
0 commit comments