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