2018-08-08 07:28:26 -05:00
|
|
|
error[E0384]: cannot assign twice to immutable variable `x`
|
2019-04-22 02:40:08 -05:00
|
|
|
--> $DIR/borrowck-match-binding-is-assignment.rs:14:13
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | x => {
|
|
|
|
| -
|
|
|
|
| |
|
|
|
|
| first assignment to `x`
|
2021-04-12 17:29:09 -05:00
|
|
|
| help: consider making this binding mutable: `mut x`
|
2019-03-17 04:52:07 -05:00
|
|
|
LL | x += 1;
|
2018-08-08 07:28:26 -05:00
|
|
|
| ^^^^^^ cannot assign twice to immutable variable
|
|
|
|
|
|
|
|
error[E0384]: cannot assign twice to immutable variable `x`
|
2019-04-22 02:40:08 -05:00
|
|
|
--> $DIR/borrowck-match-binding-is-assignment.rs:20:13
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | E::Foo(x) => {
|
|
|
|
| -
|
|
|
|
| |
|
|
|
|
| first assignment to `x`
|
2021-04-12 17:29:09 -05:00
|
|
|
| help: consider making this binding mutable: `mut x`
|
2019-03-17 04:52:07 -05:00
|
|
|
LL | x += 1;
|
2018-08-08 07:28:26 -05:00
|
|
|
| ^^^^^^ cannot assign twice to immutable variable
|
|
|
|
|
|
|
|
error[E0384]: cannot assign twice to immutable variable `x`
|
2019-04-22 02:40:08 -05:00
|
|
|
--> $DIR/borrowck-match-binding-is-assignment.rs:26:13
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | S { bar: x } => {
|
|
|
|
| -
|
|
|
|
| |
|
|
|
|
| first assignment to `x`
|
2021-04-12 17:29:09 -05:00
|
|
|
| help: consider making this binding mutable: `mut x`
|
2019-03-17 04:52:07 -05:00
|
|
|
LL | x += 1;
|
2018-08-08 07:28:26 -05:00
|
|
|
| ^^^^^^ cannot assign twice to immutable variable
|
|
|
|
|
|
|
|
error[E0384]: cannot assign twice to immutable variable `x`
|
2019-04-22 02:40:08 -05:00
|
|
|
--> $DIR/borrowck-match-binding-is-assignment.rs:32:13
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | (x,) => {
|
|
|
|
| -
|
|
|
|
| |
|
|
|
|
| first assignment to `x`
|
2021-04-12 17:29:09 -05:00
|
|
|
| help: consider making this binding mutable: `mut x`
|
2019-03-17 04:52:07 -05:00
|
|
|
LL | x += 1;
|
2018-08-08 07:28:26 -05:00
|
|
|
| ^^^^^^ cannot assign twice to immutable variable
|
|
|
|
|
|
|
|
error[E0384]: cannot assign twice to immutable variable `x`
|
2019-04-22 02:40:08 -05:00
|
|
|
--> $DIR/borrowck-match-binding-is-assignment.rs:38:13
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | [x,_,_] => {
|
|
|
|
| -
|
|
|
|
| |
|
|
|
|
| first assignment to `x`
|
2021-04-12 17:29:09 -05:00
|
|
|
| help: consider making this binding mutable: `mut x`
|
2019-03-17 04:52:07 -05:00
|
|
|
LL | x += 1;
|
2018-08-08 07:28:26 -05:00
|
|
|
| ^^^^^^ cannot assign twice to immutable variable
|
|
|
|
|
|
|
|
error: aborting due to 5 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0384`.
|