2019-08-27 23:44:44 +02:00
|
|
|
error: `mut` must be followed by a named binding
|
|
|
|
--> $DIR/mut-patterns.rs:9:9
|
|
|
|
|
|
|
|
|
LL | let mut _ = 0;
|
|
|
|
| ^^^^^ help: remove the `mut` prefix: `_`
|
|
|
|
|
|
|
|
|
= note: `mut` may be followed by `variable` and `variable @ pattern`
|
|
|
|
|
|
|
|
error: `mut` must be followed by a named binding
|
|
|
|
--> $DIR/mut-patterns.rs:10:9
|
|
|
|
|
|
|
|
|
LL | let mut (_, _) = (0, 0);
|
|
|
|
| ^^^^^^^^^^ help: remove the `mut` prefix: `(_, _)`
|
|
|
|
|
|
|
|
|
= note: `mut` may be followed by `variable` and `variable @ pattern`
|
|
|
|
|
2019-08-27 13:04:48 +02:00
|
|
|
error: `mut` on a binding may not be repeated
|
2019-08-27 23:44:44 +02:00
|
|
|
--> $DIR/mut-patterns.rs:12:13
|
2019-08-27 13:04:48 +02:00
|
|
|
|
|
|
|
|
LL | let mut mut x = 0;
|
|
|
|
| ^^^ help: remove the additional `mut`s
|
|
|
|
|
|
|
|
error: `mut` must be attached to each individual binding
|
2019-08-27 23:44:44 +02:00
|
|
|
--> $DIR/mut-patterns.rs:17:9
|
2018-10-20 23:36:17 +03:00
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | let mut Foo { x: x } = Foo { x: 3 };
|
2019-08-27 13:04:48 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^ help: add `mut` to each binding: `Foo { x: mut x }`
|
2019-08-27 23:44:44 +02:00
|
|
|
|
|
|
|
|
= note: `mut` may be followed by `variable` and `variable @ pattern`
|
2019-08-27 13:04:48 +02:00
|
|
|
|
|
|
|
error: `mut` must be attached to each individual binding
|
2019-08-27 23:44:44 +02:00
|
|
|
--> $DIR/mut-patterns.rs:21:9
|
2019-08-27 13:04:48 +02:00
|
|
|
|
|
|
|
|
LL | let mut Foo { x } = Foo { x: 3 };
|
|
|
|
| ^^^^^^^^^^^^^ help: add `mut` to each binding: `Foo { mut x }`
|
2019-08-27 23:44:44 +02:00
|
|
|
|
|
|
|
|
= note: `mut` may be followed by `variable` and `variable @ pattern`
|
2019-08-27 13:04:48 +02:00
|
|
|
|
|
|
|
error: `mut` on a binding may not be repeated
|
2019-08-27 23:44:44 +02:00
|
|
|
--> $DIR/mut-patterns.rs:26:13
|
2019-08-27 13:04:48 +02:00
|
|
|
|
|
|
|
|
LL | let mut mut yield(become, await) = r#yield(0, 0);
|
|
|
|
| ^^^ help: remove the additional `mut`s
|
|
|
|
|
|
|
|
error: expected identifier, found reserved keyword `yield`
|
2019-08-27 23:44:44 +02:00
|
|
|
--> $DIR/mut-patterns.rs:26:17
|
2019-08-27 13:04:48 +02:00
|
|
|
|
|
|
|
|
LL | let mut mut yield(become, await) = r#yield(0, 0);
|
|
|
|
| ^^^^^ expected identifier, found reserved keyword
|
2019-10-23 22:20:58 -07:00
|
|
|
|
|
2019-08-27 13:04:48 +02:00
|
|
|
help: you can escape reserved keywords to use them as identifiers
|
|
|
|
|
|
|
|
|
LL | let mut mut r#yield(become, await) = r#yield(0, 0);
|
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
error: expected identifier, found reserved keyword `become`
|
2019-08-27 23:44:44 +02:00
|
|
|
--> $DIR/mut-patterns.rs:26:23
|
2019-08-27 13:04:48 +02:00
|
|
|
|
|
|
|
|
LL | let mut mut yield(become, await) = r#yield(0, 0);
|
|
|
|
| ^^^^^^ expected identifier, found reserved keyword
|
2019-10-23 22:20:58 -07:00
|
|
|
|
|
2019-08-27 13:04:48 +02:00
|
|
|
help: you can escape reserved keywords to use them as identifiers
|
|
|
|
|
|
|
|
|
LL | let mut mut yield(r#become, await) = r#yield(0, 0);
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
2019-09-28 09:15:06 -07:00
|
|
|
error: expected identifier, found keyword `await`
|
2019-08-27 23:44:44 +02:00
|
|
|
--> $DIR/mut-patterns.rs:26:31
|
2019-08-27 13:04:48 +02:00
|
|
|
|
|
|
|
|
LL | let mut mut yield(become, await) = r#yield(0, 0);
|
2019-09-28 09:15:06 -07:00
|
|
|
| ^^^^^ expected identifier, found keyword
|
2019-10-23 22:20:58 -07:00
|
|
|
|
|
2019-08-27 13:04:48 +02:00
|
|
|
help: you can escape reserved keywords to use them as identifiers
|
|
|
|
|
|
|
|
|
LL | let mut mut yield(become, r#await) = r#yield(0, 0);
|
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
error: `mut` must be attached to each individual binding
|
2019-08-27 23:44:44 +02:00
|
|
|
--> $DIR/mut-patterns.rs:26:9
|
2019-08-27 13:04:48 +02:00
|
|
|
|
|
|
|
|
LL | let mut mut yield(become, await) = r#yield(0, 0);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add `mut` to each binding: `r#yield(mut r#become, mut r#await)`
|
2019-08-27 23:44:44 +02:00
|
|
|
|
|
|
|
|
= note: `mut` may be followed by `variable` and `variable @ pattern`
|
2019-08-27 13:04:48 +02:00
|
|
|
|
|
|
|
error: `mut` must be attached to each individual binding
|
2019-08-27 23:44:44 +02:00
|
|
|
--> $DIR/mut-patterns.rs:35:9
|
2019-08-27 13:04:48 +02:00
|
|
|
|
|
|
|
|
LL | let mut W(mut a, W(b, W(ref c, W(d, B { box f }))))
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add `mut` to each binding: `W(mut a, W(mut b, W(ref c, W(mut d, B { box mut f }))))`
|
2019-08-27 23:44:44 +02:00
|
|
|
|
|
|
|
|
= note: `mut` may be followed by `variable` and `variable @ pattern`
|
2018-10-20 23:36:17 +03:00
|
|
|
|
2019-08-27 19:51:21 +02:00
|
|
|
error: expected identifier, found `x`
|
2019-08-27 23:44:44 +02:00
|
|
|
--> $DIR/mut-patterns.rs:42:21
|
2019-08-27 19:51:21 +02:00
|
|
|
|
|
|
|
|
LL | let mut $p = 0;
|
|
|
|
| ^^ expected identifier
|
|
|
|
...
|
|
|
|
LL | foo!(x);
|
|
|
|
| -------- in this macro invocation
|
|
|
|
|
2019-08-27 23:44:44 +02:00
|
|
|
error: aborting due to 12 previous errors
|
2018-10-20 23:36:17 +03:00
|
|
|
|