@@ -262,74 +262,90 @@ LL | fn imm_local(mut x: (i32,)) {
262262error[E0594]: cannot assign to `x`, as it is not declared as mutable
263263 --> $DIR/mutability-errors.rs:60:9
264264 |
265- LL | fn imm_capture(x: (i32,)) {
266- | - help: consider changing this to be mutable: `mut x`
267- LL | || {
268265LL | x = (1,);
269266 | ^^^^^^^^ cannot assign
267+ |
268+ help: consider changing this to be mutable
269+ |
270+ LL | fn imm_capture(mut x: (i32,)) {
271+ | +++
270272
271273error[E0594]: cannot assign to `x.0`, as `x` is not declared as mutable
272274 --> $DIR/mutability-errors.rs:61:9
273275 |
274- LL | fn imm_capture(x: (i32,)) {
275- | - help: consider changing this to be mutable: `mut x`
276- ...
277276LL | x.0 = 1;
278277 | ^^^^^^^ cannot assign
278+ |
279+ help: consider changing this to be mutable
280+ |
281+ LL | fn imm_capture(mut x: (i32,)) {
282+ | +++
279283
280284error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable
281285 --> $DIR/mutability-errors.rs:62:9
282286 |
283- LL | fn imm_capture(x: (i32,)) {
284- | - help: consider changing this to be mutable: `mut x`
285- ...
286287LL | &mut x;
287288 | ^^^^^^ cannot borrow as mutable
289+ |
290+ help: consider changing this to be mutable
291+ |
292+ LL | fn imm_capture(mut x: (i32,)) {
293+ | +++
288294
289295error[E0596]: cannot borrow `x.0` as mutable, as `x` is not declared as mutable
290296 --> $DIR/mutability-errors.rs:63:9
291297 |
292- LL | fn imm_capture(x: (i32,)) {
293- | - help: consider changing this to be mutable: `mut x`
294- ...
295298LL | &mut x.0;
296299 | ^^^^^^^^ cannot borrow as mutable
300+ |
301+ help: consider changing this to be mutable
302+ |
303+ LL | fn imm_capture(mut x: (i32,)) {
304+ | +++
297305
298306error[E0594]: cannot assign to `x`, as it is not declared as mutable
299307 --> $DIR/mutability-errors.rs:66:9
300308 |
301- LL | fn imm_capture(x: (i32,)) {
302- | - help: consider changing this to be mutable: `mut x`
303- ...
304309LL | x = (1,);
305310 | ^^^^^^^^ cannot assign
311+ |
312+ help: consider changing this to be mutable
313+ |
314+ LL | fn imm_capture(mut x: (i32,)) {
315+ | +++
306316
307317error[E0594]: cannot assign to `x.0`, as `x` is not declared as mutable
308318 --> $DIR/mutability-errors.rs:67:9
309319 |
310- LL | fn imm_capture(x: (i32,)) {
311- | - help: consider changing this to be mutable: `mut x`
312- ...
313320LL | x.0 = 1;
314321 | ^^^^^^^ cannot assign
322+ |
323+ help: consider changing this to be mutable
324+ |
325+ LL | fn imm_capture(mut x: (i32,)) {
326+ | +++
315327
316328error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable
317329 --> $DIR/mutability-errors.rs:68:9
318330 |
319- LL | fn imm_capture(x: (i32,)) {
320- | - help: consider changing this to be mutable: `mut x`
321- ...
322331LL | &mut x;
323332 | ^^^^^^ cannot borrow as mutable
333+ |
334+ help: consider changing this to be mutable
335+ |
336+ LL | fn imm_capture(mut x: (i32,)) {
337+ | +++
324338
325339error[E0596]: cannot borrow `x.0` as mutable, as `x` is not declared as mutable
326340 --> $DIR/mutability-errors.rs:69:9
327341 |
328- LL | fn imm_capture(x: (i32,)) {
329- | - help: consider changing this to be mutable: `mut x`
330- ...
331342LL | &mut x.0;
332343 | ^^^^^^^^ cannot borrow as mutable
344+ |
345+ help: consider changing this to be mutable
346+ |
347+ LL | fn imm_capture(mut x: (i32,)) {
348+ | +++
333349
334350error[E0594]: cannot assign to immutable static item `X`
335351 --> $DIR/mutability-errors.rs:76:5
0 commit comments