@@ -144,132 +144,116 @@ LL | assert_eq!(ATOMIC.load(Ordering::SeqCst), 5); //~ ERROR interior mutabi
144
144
= help: assign this const to a local or static variable, and use the variable here
145
145
146
146
error: a const item with interior mutability should not be borrowed
147
- --> $DIR/non_copy_const.rs:98:5
148
- |
149
- LL | ATOMIC_USIZE_INIT.store(2, Ordering::SeqCst); //~ ERROR interior mutability
150
- | ^^^^^^^^^^^^^^^^^
151
- |
152
- = help: assign this const to a local or static variable, and use the variable here
153
-
154
- error: a const item with interior mutability should not be borrowed
155
- --> $DIR/non_copy_const.rs:99:16
156
- |
157
- LL | assert_eq!(ATOMIC_USIZE_INIT.load(Ordering::SeqCst), 0); //~ ERROR interior mutability
158
- | ^^^^^^^^^^^^^^^^^
159
- |
160
- = help: assign this const to a local or static variable, and use the variable here
161
-
162
- error: a const item with interior mutability should not be borrowed
163
- --> $DIR/non_copy_const.rs:102:22
147
+ --> $DIR/non_copy_const.rs:99:22
164
148
|
165
149
LL | let _once_ref = &ONCE_INIT; //~ ERROR interior mutability
166
150
| ^^^^^^^^^
167
151
|
168
152
= help: assign this const to a local or static variable, and use the variable here
169
153
170
154
error: a const item with interior mutability should not be borrowed
171
- --> $DIR/non_copy_const.rs:103 :25
155
+ --> $DIR/non_copy_const.rs:100 :25
172
156
|
173
157
LL | let _once_ref_2 = &&ONCE_INIT; //~ ERROR interior mutability
174
158
| ^^^^^^^^^
175
159
|
176
160
= help: assign this const to a local or static variable, and use the variable here
177
161
178
162
error: a const item with interior mutability should not be borrowed
179
- --> $DIR/non_copy_const.rs:104 :27
163
+ --> $DIR/non_copy_const.rs:101 :27
180
164
|
181
165
LL | let _once_ref_4 = &&&&ONCE_INIT; //~ ERROR interior mutability
182
166
| ^^^^^^^^^
183
167
|
184
168
= help: assign this const to a local or static variable, and use the variable here
185
169
186
170
error: a const item with interior mutability should not be borrowed
187
- --> $DIR/non_copy_const.rs:105 :26
171
+ --> $DIR/non_copy_const.rs:102 :26
188
172
|
189
173
LL | let _once_mut = &mut ONCE_INIT; //~ ERROR interior mutability
190
174
| ^^^^^^^^^
191
175
|
192
176
= help: assign this const to a local or static variable, and use the variable here
193
177
194
178
error: a const item with interior mutability should not be borrowed
195
- --> $DIR/non_copy_const.rs:116 :14
179
+ --> $DIR/non_copy_const.rs:113 :14
196
180
|
197
181
LL | let _ = &ATOMIC_TUPLE; //~ ERROR interior mutability
198
182
| ^^^^^^^^^^^^
199
183
|
200
184
= help: assign this const to a local or static variable, and use the variable here
201
185
202
186
error: a const item with interior mutability should not be borrowed
203
- --> $DIR/non_copy_const.rs:117 :14
187
+ --> $DIR/non_copy_const.rs:114 :14
204
188
|
205
189
LL | let _ = &ATOMIC_TUPLE.0; //~ ERROR interior mutability
206
190
| ^^^^^^^^^^^^
207
191
|
208
192
= help: assign this const to a local or static variable, and use the variable here
209
193
210
194
error: a const item with interior mutability should not be borrowed
211
- --> $DIR/non_copy_const.rs:118 :19
195
+ --> $DIR/non_copy_const.rs:115 :19
212
196
|
213
197
LL | let _ = &(&&&&ATOMIC_TUPLE).0; //~ ERROR interior mutability
214
198
| ^^^^^^^^^^^^
215
199
|
216
200
= help: assign this const to a local or static variable, and use the variable here
217
201
218
202
error: a const item with interior mutability should not be borrowed
219
- --> $DIR/non_copy_const.rs:119 :14
203
+ --> $DIR/non_copy_const.rs:116 :14
220
204
|
221
205
LL | let _ = &ATOMIC_TUPLE.0[0]; //~ ERROR interior mutability
222
206
| ^^^^^^^^^^^^
223
207
|
224
208
= help: assign this const to a local or static variable, and use the variable here
225
209
226
210
error: a const item with interior mutability should not be borrowed
227
- --> $DIR/non_copy_const.rs:120 :13
211
+ --> $DIR/non_copy_const.rs:117 :13
228
212
|
229
213
LL | let _ = ATOMIC_TUPLE.0[0].load(Ordering::SeqCst); //~ ERROR interior mutability
230
214
| ^^^^^^^^^^^^
231
215
|
232
216
= help: assign this const to a local or static variable, and use the variable here
233
217
234
218
error: a const item with interior mutability should not be borrowed
235
- --> $DIR/non_copy_const.rs:126 :13
219
+ --> $DIR/non_copy_const.rs:123 :13
236
220
|
237
221
LL | let _ = ATOMIC_TUPLE.0[0]; //~ ERROR interior mutability
238
222
| ^^^^^^^^^^^^
239
223
|
240
224
= help: assign this const to a local or static variable, and use the variable here
241
225
242
226
error: a const item with interior mutability should not be borrowed
243
- --> $DIR/non_copy_const.rs:131 :5
227
+ --> $DIR/non_copy_const.rs:128 :5
244
228
|
245
229
LL | CELL.set(2); //~ ERROR interior mutability
246
230
| ^^^^
247
231
|
248
232
= help: assign this const to a local or static variable, and use the variable here
249
233
250
234
error: a const item with interior mutability should not be borrowed
251
- --> $DIR/non_copy_const.rs:132 :16
235
+ --> $DIR/non_copy_const.rs:129 :16
252
236
|
253
237
LL | assert_eq!(CELL.get(), 6); //~ ERROR interior mutability
254
238
| ^^^^
255
239
|
256
240
= help: assign this const to a local or static variable, and use the variable here
257
241
258
242
error: a const item with interior mutability should not be borrowed
259
- --> $DIR/non_copy_const.rs:145 :5
243
+ --> $DIR/non_copy_const.rs:142 :5
260
244
|
261
245
LL | u64::ATOMIC.store(5, Ordering::SeqCst); //~ ERROR interior mutability
262
246
| ^^^^^^^^^^^
263
247
|
264
248
= help: assign this const to a local or static variable, and use the variable here
265
249
266
250
error: a const item with interior mutability should not be borrowed
267
- --> $DIR/non_copy_const.rs:146 :16
251
+ --> $DIR/non_copy_const.rs:143 :16
268
252
|
269
253
LL | assert_eq!(u64::ATOMIC.load(Ordering::SeqCst), 9); //~ ERROR interior mutability
270
254
| ^^^^^^^^^^^
271
255
|
272
256
= help: assign this const to a local or static variable, and use the variable here
273
257
274
- error: aborting due to 31 previous errors
258
+ error: aborting due to 29 previous errors
275
259
0 commit comments