]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-45199.mir.stderr
Auto merge of #57108 - Mark-Simulacrum:license-remove, r=pietroalbini
[rust.git] / src / test / ui / issues / issue-45199.mir.stderr
1 error[E0384]: cannot assign twice to immutable variable `b`
2   --> $DIR/issue-45199.rs:10:5
3    |
4 LL |     let b: Box<isize>;
5    |         - help: make this binding mutable: `mut b`
6 ...
7 LL |     b = Box::new(1);    //[ast]~ NOTE first assignment
8    |     - first assignment to `b`
9 LL |                         //[mir]~^ NOTE first assignment
10 LL |     b = Box::new(2);    //[ast]~ ERROR cannot assign twice to immutable variable
11    |     ^ cannot assign twice to immutable variable
12
13 error[E0384]: cannot assign twice to immutable variable `b`
14   --> $DIR/issue-45199.rs:21:5
15    |
16 LL |     let b = Box::new(1);    //[ast]~ NOTE first assignment
17    |         -
18    |         |
19    |         first assignment to `b`
20    |         help: make this binding mutable: `mut b`
21 ...
22 LL |     b = Box::new(2);        //[ast]~ ERROR cannot assign twice to immutable variable
23    |     ^ cannot assign twice to immutable variable
24
25 error[E0384]: cannot assign to immutable argument `b`
26   --> $DIR/issue-45199.rs:30:5
27    |
28 LL | fn test_args(b: Box<i32>) {  //[ast]~ NOTE first assignment
29    |              - help: make this binding mutable: `mut b`
30 ...
31 LL |     b = Box::new(2);            //[ast]~ ERROR cannot assign twice to immutable variable
32    |     ^ cannot assign to immutable argument
33
34 error: aborting due to 3 previous errors
35
36 For more information about this error, try `rustc --explain E0384`.