@@ -262,74 +262,90 @@ LL | fn imm_local(mut x: (i32,)) {
262
262
error[E0594]: cannot assign to `x`, as it is not declared as mutable
263
263
--> $DIR/mutability-errors.rs:60:9
264
264
|
265
- LL | fn imm_capture(x: (i32,)) {
266
- | - help: consider changing this to be mutable: `mut x`
267
- LL | || {
268
265
LL | x = (1,);
269
266
| ^^^^^^^^ cannot assign
267
+ |
268
+ help: consider changing this to be mutable
269
+ |
270
+ LL | fn imm_capture(mut x: (i32,)) {
271
+ | +++
270
272
271
273
error[E0594]: cannot assign to `x.0`, as `x` is not declared as mutable
272
274
--> $DIR/mutability-errors.rs:61:9
273
275
|
274
- LL | fn imm_capture(x: (i32,)) {
275
- | - help: consider changing this to be mutable: `mut x`
276
- ...
277
276
LL | x.0 = 1;
278
277
| ^^^^^^^ cannot assign
278
+ |
279
+ help: consider changing this to be mutable
280
+ |
281
+ LL | fn imm_capture(mut x: (i32,)) {
282
+ | +++
279
283
280
284
error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable
281
285
--> $DIR/mutability-errors.rs:62:9
282
286
|
283
- LL | fn imm_capture(x: (i32,)) {
284
- | - help: consider changing this to be mutable: `mut x`
285
- ...
286
287
LL | &mut x;
287
288
| ^^^^^^ cannot borrow as mutable
289
+ |
290
+ help: consider changing this to be mutable
291
+ |
292
+ LL | fn imm_capture(mut x: (i32,)) {
293
+ | +++
288
294
289
295
error[E0596]: cannot borrow `x.0` as mutable, as `x` is not declared as mutable
290
296
--> $DIR/mutability-errors.rs:63:9
291
297
|
292
- LL | fn imm_capture(x: (i32,)) {
293
- | - help: consider changing this to be mutable: `mut x`
294
- ...
295
298
LL | &mut x.0;
296
299
| ^^^^^^^^ cannot borrow as mutable
300
+ |
301
+ help: consider changing this to be mutable
302
+ |
303
+ LL | fn imm_capture(mut x: (i32,)) {
304
+ | +++
297
305
298
306
error[E0594]: cannot assign to `x`, as it is not declared as mutable
299
307
--> $DIR/mutability-errors.rs:66:9
300
308
|
301
- LL | fn imm_capture(x: (i32,)) {
302
- | - help: consider changing this to be mutable: `mut x`
303
- ...
304
309
LL | x = (1,);
305
310
| ^^^^^^^^ cannot assign
311
+ |
312
+ help: consider changing this to be mutable
313
+ |
314
+ LL | fn imm_capture(mut x: (i32,)) {
315
+ | +++
306
316
307
317
error[E0594]: cannot assign to `x.0`, as `x` is not declared as mutable
308
318
--> $DIR/mutability-errors.rs:67:9
309
319
|
310
- LL | fn imm_capture(x: (i32,)) {
311
- | - help: consider changing this to be mutable: `mut x`
312
- ...
313
320
LL | x.0 = 1;
314
321
| ^^^^^^^ cannot assign
322
+ |
323
+ help: consider changing this to be mutable
324
+ |
325
+ LL | fn imm_capture(mut x: (i32,)) {
326
+ | +++
315
327
316
328
error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable
317
329
--> $DIR/mutability-errors.rs:68:9
318
330
|
319
- LL | fn imm_capture(x: (i32,)) {
320
- | - help: consider changing this to be mutable: `mut x`
321
- ...
322
331
LL | &mut x;
323
332
| ^^^^^^ cannot borrow as mutable
333
+ |
334
+ help: consider changing this to be mutable
335
+ |
336
+ LL | fn imm_capture(mut x: (i32,)) {
337
+ | +++
324
338
325
339
error[E0596]: cannot borrow `x.0` as mutable, as `x` is not declared as mutable
326
340
--> $DIR/mutability-errors.rs:69:9
327
341
|
328
- LL | fn imm_capture(x: (i32,)) {
329
- | - help: consider changing this to be mutable: `mut x`
330
- ...
331
342
LL | &mut x.0;
332
343
| ^^^^^^^^ cannot borrow as mutable
344
+ |
345
+ help: consider changing this to be mutable
346
+ |
347
+ LL | fn imm_capture(mut x: (i32,)) {
348
+ | +++
333
349
334
350
error[E0594]: cannot assign to immutable static item `X`
335
351
--> $DIR/mutability-errors.rs:76:5
0 commit comments