]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-45199.ast.stderr
Rollup merge of #54257 - alexcrichton:wasm-math-symbols, r=TimNN
[rust.git] / src / test / ui / issues / issue-45199.ast.stderr
1 error[E0384]: cannot assign twice to immutable variable `b`
2   --> $DIR/issue-45199.rs:20:5
3    |
4 LL |     b = Box::new(1);    //[ast]~ NOTE first assignment
5    |     --------------- first assignment to `b`
6 LL |                         //[mir]~^ NOTE first assignment
7 LL |     b = Box::new(2);    //[ast]~ ERROR cannot assign twice to immutable variable
8    |     ^^^^^^^^^^^^^^^ cannot assign twice to immutable variable
9
10 error[E0384]: cannot assign twice to immutable variable `b`
11   --> $DIR/issue-45199.rs:31:5
12    |
13 LL |     let b = Box::new(1);    //[ast]~ NOTE first assignment
14    |         - first assignment to `b`
15 ...
16 LL |     b = Box::new(2);        //[ast]~ ERROR cannot assign twice to immutable variable
17    |     ^^^^^^^^^^^^^^^ cannot assign twice to immutable variable
18
19 error[E0384]: cannot assign twice to immutable variable `b`
20   --> $DIR/issue-45199.rs:40:5
21    |
22 LL | fn test_args(b: Box<i32>) {  //[ast]~ NOTE first assignment
23    |              - first assignment to `b`
24 ...
25 LL |     b = Box::new(2);            //[ast]~ ERROR cannot assign twice to immutable variable
26    |     ^^^^^^^^^^^^^^^ cannot assign twice to immutable variable
27
28 error: aborting due to 3 previous errors
29
30 For more information about this error, try `rustc --explain E0384`.