2019-08-27 21:44:44 +00: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`
|
|
|
|
|
2020-02-17 15:03:07 +00:00
|
|
|
error: `mut` must be attached to each individual binding
|
|
|
|
--> $DIR/mut-patterns.rs:12:9
|
|
|
|
|
|
|
|
|
LL | let mut (x @ y) = 0;
|
|
|
|
| ^^^^^^^^^^^ help: add `mut` to each binding: `(mut x @ mut y)`
|
|
|
|
|
|
|
|
|
= note: `mut` may be followed by `variable` and `variable @ pattern`
|
|
|
|
|
2019-08-27 11:04:48 +00:00
|
|
|
error: `mut` on a binding may not be repeated
|
2020-02-17 15:03:07 +00:00
|
|
|
--> $DIR/mut-patterns.rs:14:13
|
2019-08-27 11:04:48 +00:00
|
|
|
|
|
|
|
|
LL | let mut mut x = 0;
|
|
|
|
| ^^^ help: remove the additional `mut`s
|
|
|
|
|
|
|
|
error: `mut` must be attached to each individual binding
|
2020-02-17 15:03:07 +00:00
|
|
|
--> $DIR/mut-patterns.rs:19:9
|
2018-10-20 20:36:17 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | let mut Foo { x: x } = Foo { x: 3 };
|
2019-08-27 11:04:48 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^ help: add `mut` to each binding: `Foo { x: mut x }`
|
2019-08-27 21:44:44 +00:00
|
|
|
|
|
|
|
|
= note: `mut` may be followed by `variable` and `variable @ pattern`
|
2019-08-27 11:04:48 +00:00
|
|
|
|
|
|
|
error: `mut` must be attached to each individual binding
|
2020-02-17 15:03:07 +00:00
|
|
|
--> $DIR/mut-patterns.rs:23:9
|
2019-08-27 11:04:48 +00:00
|
|
|
|
|
|
|
|
LL | let mut Foo { x } = Foo { x: 3 };
|
|
|
|
| ^^^^^^^^^^^^^ help: add `mut` to each binding: `Foo { mut x }`
|
2019-08-27 21:44:44 +00:00
|
|
|
|
|
|
|
|
= note: `mut` may be followed by `variable` and `variable @ pattern`
|
2019-08-27 11:04:48 +00:00
|
|
|
|
|
|
|
error: `mut` on a binding may not be repeated
|
2020-02-17 15:03:07 +00:00
|
|
|
--> $DIR/mut-patterns.rs:28:13
|
2019-08-27 11:04:48 +00: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`
|
2020-02-17 15:03:07 +00:00
|
|
|
--> $DIR/mut-patterns.rs:28:17
|
2019-08-27 11:04:48 +00:00
|
|
|
|
|
|
|
|
LL | let mut mut yield(become, await) = r#yield(0, 0);
|
|
|
|
| ^^^^^ expected identifier, found reserved keyword
|
2019-10-24 05:20:58 +00:00
|
|
|
|
|
2022-01-27 22:53:39 +00:00
|
|
|
help: escape `yield` to use it as an identifier
|
2019-08-27 11:04:48 +00:00
|
|
|
|
|
|
|
|
LL | let mut mut r#yield(become, await) = r#yield(0, 0);
|
2022-01-27 22:53:39 +00:00
|
|
|
| ++
|
2019-08-27 11:04:48 +00:00
|
|
|
|
|
|
|
error: expected identifier, found reserved keyword `become`
|
2020-02-17 15:03:07 +00:00
|
|
|
--> $DIR/mut-patterns.rs:28:23
|
2019-08-27 11:04:48 +00:00
|
|
|
|
|
|
|
|
LL | let mut mut yield(become, await) = r#yield(0, 0);
|
|
|
|
| ^^^^^^ expected identifier, found reserved keyword
|
2019-10-24 05:20:58 +00:00
|
|
|
|
|
2022-01-27 22:53:39 +00:00
|
|
|
help: escape `become` to use it as an identifier
|
2019-08-27 11:04:48 +00:00
|
|
|
|
|
|
|
|
LL | let mut mut yield(r#become, await) = r#yield(0, 0);
|
2022-01-27 22:53:39 +00:00
|
|
|
| ++
|
2019-08-27 11:04:48 +00:00
|
|
|
|
2019-09-28 16:15:06 +00:00
|
|
|
error: expected identifier, found keyword `await`
|
2020-02-17 15:03:07 +00:00
|
|
|
--> $DIR/mut-patterns.rs:28:31
|
2019-08-27 11:04:48 +00:00
|
|
|
|
|
|
|
|
LL | let mut mut yield(become, await) = r#yield(0, 0);
|
2019-09-28 16:15:06 +00:00
|
|
|
| ^^^^^ expected identifier, found keyword
|
2019-10-24 05:20:58 +00:00
|
|
|
|
|
2022-01-27 22:53:39 +00:00
|
|
|
help: escape `await` to use it as an identifier
|
2019-08-27 11:04:48 +00:00
|
|
|
|
|
|
|
|
LL | let mut mut yield(become, r#await) = r#yield(0, 0);
|
2022-01-27 22:53:39 +00:00
|
|
|
| ++
|
2019-08-27 11:04:48 +00:00
|
|
|
|
|
|
|
error: `mut` must be attached to each individual binding
|
2020-02-17 15:03:07 +00:00
|
|
|
--> $DIR/mut-patterns.rs:28:9
|
2019-08-27 11:04:48 +00: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 21:44:44 +00:00
|
|
|
|
|
|
|
|
= note: `mut` may be followed by `variable` and `variable @ pattern`
|
2019-08-27 11:04:48 +00:00
|
|
|
|
|
|
|
error: `mut` must be attached to each individual binding
|
2020-02-17 15:03:07 +00:00
|
|
|
--> $DIR/mut-patterns.rs:37:9
|
2019-08-27 11:04:48 +00: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 21:44:44 +00:00
|
|
|
|
|
|
|
|
= note: `mut` may be followed by `variable` and `variable @ pattern`
|
2018-10-20 20:36:17 +00:00
|
|
|
|
2019-08-27 17:51:21 +00:00
|
|
|
error: expected identifier, found `x`
|
2020-02-17 15:03:07 +00:00
|
|
|
--> $DIR/mut-patterns.rs:44:21
|
2019-08-27 17:51:21 +00:00
|
|
|
|
|
|
|
|
LL | let mut $p = 0;
|
|
|
|
| ^^ expected identifier
|
|
|
|
...
|
|
|
|
LL | foo!(x);
|
2021-10-14 18:28:28 +00:00
|
|
|
| ------- in this macro invocation
|
2019-12-16 13:56:47 +00:00
|
|
|
|
|
2021-02-13 19:52:25 +00:00
|
|
|
= note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
|
2019-08-27 17:51:21 +00:00
|
|
|
|
2020-02-17 15:03:07 +00:00
|
|
|
error: aborting due to 13 previous errors
|
2018-10-20 20:36:17 +00:00
|
|
|
|