@@ -105,6 +105,50 @@ LL | }
105105error[E0716]: temporary value dropped while borrowed
106106 --> $DIR/promote-not.rs:52:29
107107 |
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+ |
108152LL | let _val: &'static _ = &(1%0);
109153 | ---------- ^^^^^ creates a temporary value which is freed while still in use
110154 | |
@@ -114,7 +158,7 @@ LL | }
114158 | - temporary value is freed at the end of this statement
115159
116160error[E0716]: temporary value dropped while borrowed
117- --> $DIR/promote-not.rs:53 :29
161+ --> $DIR/promote-not.rs:57 :29
118162 |
119163LL | let _val: &'static _ = &(1%(1-1));
120164 | ---------- ^^^^^^^^^ creates a temporary value which is freed while still in use
@@ -125,7 +169,7 @@ LL | }
125169 | - temporary value is freed at the end of this statement
126170
127171error[E0716]: temporary value dropped while borrowed
128- --> $DIR/promote-not.rs:54 :29
172+ --> $DIR/promote-not.rs:58 :29
129173 |
130174LL | let _val: &'static _ = &([1,2,3][4]+1);
131175 | ---------- ^^^^^^^^^^^^^^ creates a temporary value which is freed while still in use
@@ -136,7 +180,7 @@ LL | }
136180 | - temporary value is freed at the end of this statement
137181
138182error[E0716]: temporary value dropped while borrowed
139- --> $DIR/promote-not.rs:57 :29
183+ --> $DIR/promote-not.rs:61 :29
140184 |
141185LL | let _val: &'static _ = &TEST_DROP;
142186 | ---------- ^^^^^^^^^ creates a temporary value which is freed while still in use
@@ -147,7 +191,7 @@ LL | }
147191 | - temporary value is freed at the end of this statement
148192
149193error[E0716]: temporary value dropped while borrowed
150- --> $DIR/promote-not.rs:59 :29
194+ --> $DIR/promote-not.rs:63 :29
151195 |
152196LL | let _val: &'static _ = &&TEST_DROP;
153197 | ---------- ^^^^^^^^^^ creates a temporary value which is freed while still in use
@@ -158,7 +202,7 @@ LL | }
158202 | - temporary value is freed at the end of this statement
159203
160204error[E0716]: temporary value dropped while borrowed
161- --> $DIR/promote-not.rs:59 :30
205+ --> $DIR/promote-not.rs:63 :30
162206 |
163207LL | let _val: &'static _ = &&TEST_DROP;
164208 | ---------- ^^^^^^^^^ creates a temporary value which is freed while still in use
@@ -169,7 +213,7 @@ LL | }
169213 | - temporary value is freed at the end of this statement
170214
171215error[E0716]: temporary value dropped while borrowed
172- --> $DIR/promote-not.rs:62 :29
216+ --> $DIR/promote-not.rs:66 :29
173217 |
174218LL | let _val: &'static _ = &(&TEST_DROP,);
175219 | ---------- ^^^^^^^^^^^^^ creates a temporary value which is freed while still in use
@@ -180,7 +224,7 @@ LL | }
180224 | - temporary value is freed at the end of this statement
181225
182226error[E0716]: temporary value dropped while borrowed
183- --> $DIR/promote-not.rs:62 :31
227+ --> $DIR/promote-not.rs:66 :31
184228 |
185229LL | let _val: &'static _ = &(&TEST_DROP,);
186230 | ---------- ^^^^^^^^^ creates a temporary value which is freed while still in use
@@ -191,7 +235,7 @@ LL | }
191235 | - temporary value is freed at the end of this statement
192236
193237error[E0716]: temporary value dropped while borrowed
194- --> $DIR/promote-not.rs:65 :29
238+ --> $DIR/promote-not.rs:69 :29
195239 |
196240LL | let _val: &'static _ = &[&TEST_DROP; 1];
197241 | ---------- ^^^^^^^^^^^^^^^ creates a temporary value which is freed while still in use
@@ -202,14 +246,14 @@ LL | }
202246 | - temporary value is freed at the end of this statement
203247
204248error[E0716]: temporary value dropped while borrowed
205- --> $DIR/promote-not.rs:65 :31
249+ --> $DIR/promote-not.rs:69 :31
206250 |
207251LL | let _val: &'static _ = &[&TEST_DROP; 1];
208252 | ---------- ^^^^^^^^^ - temporary value is freed at the end of this statement
209253 | | |
210254 | | creates a temporary value which is freed while still in use
211255 | type annotation requires that borrow lasts for `'static`
212256
213- error: aborting due to 20 previous errors
257+ error: aborting due to 24 previous errors
214258
215259For more information about this error, try `rustc --explain E0716`.
0 commit comments