]> git.proxmox.com Git - rustc.git/blob - tests/ui/borrowck/issue-45199.stderr
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / borrowck / issue-45199.stderr
1 error[E0384]: cannot assign twice to immutable variable `b`
2 --> $DIR/issue-45199.rs:6:5
3 |
4 LL | let b: Box<isize>;
5 | - help: consider making this binding mutable: `mut b`
6 ...
7 LL | b = Box::new(1);
8 | - first assignment to `b`
9 LL | b = Box::new(2);
10 | ^ cannot assign twice to immutable variable
11
12 error[E0384]: cannot assign twice to immutable variable `b`
13 --> $DIR/issue-45199.rs:14:5
14 |
15 LL | let b = Box::new(1);
16 | -
17 | |
18 | first assignment to `b`
19 | help: consider making this binding mutable: `mut b`
20 ...
21 LL | b = Box::new(2);
22 | ^ cannot assign twice to immutable variable
23
24 error[E0384]: cannot assign to immutable argument `b`
25 --> $DIR/issue-45199.rs:20:5
26 |
27 LL | fn test_args(b: Box<i32>) {
28 | - help: consider making this binding mutable: `mut b`
29 LL |
30 LL | b = Box::new(2);
31 | ^ cannot assign to immutable argument
32
33 error: aborting due to 3 previous errors
34
35 For more information about this error, try `rustc --explain E0384`.