@@ -277,57 +277,41 @@ LL | &mut x; //~ ERROR
277
277
LL | &mut x.0; //~ ERROR
278
278
| ^^^^^^^^ cannot borrow as mutable
279
279
280
- warning [E0594]: cannot assign to `x`, as it is not declared as mutable
280
+ error [E0594]: cannot assign to `x`, as it is not declared as mutable
281
281
--> $DIR/mutability-errors.rs:70:9
282
282
|
283
283
LL | fn imm_capture(x: (i32,)) {
284
284
| - help: consider changing this to be mutable: `mut x`
285
285
LL | || { //~ ERROR
286
286
LL | x = (1,);
287
287
| ^^^^^^^^ cannot assign
288
- |
289
- = warning: This error has been downgraded to a warning for backwards compatibility with previous releases.
290
- It represents potential unsoundness in your code.
291
- This warning will become a hard error in the future.
292
288
293
- warning [E0594]: cannot assign to `x.0`, as `x` is not declared as mutable
289
+ error [E0594]: cannot assign to `x.0`, as `x` is not declared as mutable
294
290
--> $DIR/mutability-errors.rs:71:9
295
291
|
296
292
LL | fn imm_capture(x: (i32,)) {
297
293
| - help: consider changing this to be mutable: `mut x`
298
294
...
299
295
LL | x.0 = 1;
300
296
| ^^^^^^^ cannot assign
301
- |
302
- = warning: This error has been downgraded to a warning for backwards compatibility with previous releases.
303
- It represents potential unsoundness in your code.
304
- This warning will become a hard error in the future.
305
297
306
- warning [E0596]: cannot borrow `x` as mutable, as it is not declared as mutable
298
+ error [E0596]: cannot borrow `x` as mutable, as it is not declared as mutable
307
299
--> $DIR/mutability-errors.rs:72:9
308
300
|
309
301
LL | fn imm_capture(x: (i32,)) {
310
302
| - help: consider changing this to be mutable: `mut x`
311
303
...
312
304
LL | &mut x;
313
305
| ^^^^^^ cannot borrow as mutable
314
- |
315
- = warning: This error has been downgraded to a warning for backwards compatibility with previous releases.
316
- It represents potential unsoundness in your code.
317
- This warning will become a hard error in the future.
318
306
319
- warning [E0596]: cannot borrow `x.0` as mutable, as `x` is not declared as mutable
307
+ error [E0596]: cannot borrow `x.0` as mutable, as `x` is not declared as mutable
320
308
--> $DIR/mutability-errors.rs:73:9
321
309
|
322
310
LL | fn imm_capture(x: (i32,)) {
323
311
| - help: consider changing this to be mutable: `mut x`
324
312
...
325
313
LL | &mut x.0;
326
314
| ^^^^^^^^ cannot borrow as mutable
327
- |
328
- = warning: This error has been downgraded to a warning for backwards compatibility with previous releases.
329
- It represents potential unsoundness in your code.
330
- This warning will become a hard error in the future.
331
315
332
316
error[E0594]: cannot assign to `x`, as it is not declared as mutable
333
317
--> $DIR/mutability-errors.rs:76:9
@@ -389,7 +373,7 @@ error[E0596]: cannot borrow `X.0` as mutable, as `X` is an immutable static item
389
373
LL | &mut X.0; //~ ERROR
390
374
| ^^^^^^^^ cannot borrow as mutable
391
375
392
- error: aborting due to 34 previous errors
376
+ error: aborting due to 38 previous errors
393
377
394
378
Some errors occurred: E0594, E0596.
395
379
For more information about an error, try `rustc --explain E0594`.
0 commit comments