]> git.proxmox.com Git - rustc.git/blame - src/test/ui/parser/mut-patterns.stderr
New upstream version 1.54.0+dfsg1
[rustc.git] / src / test / ui / parser / mut-patterns.stderr
CommitLineData
e1599b0c
XL
1error: `mut` must be followed by a named binding
2 --> $DIR/mut-patterns.rs:9:9
3 |
4LL | let mut _ = 0;
5 | ^^^^^ help: remove the `mut` prefix: `_`
6 |
7 = note: `mut` may be followed by `variable` and `variable @ pattern`
8
9error: `mut` must be followed by a named binding
10 --> $DIR/mut-patterns.rs:10:9
11 |
12LL | let mut (_, _) = (0, 0);
13 | ^^^^^^^^^^ help: remove the `mut` prefix: `(_, _)`
14 |
15 = note: `mut` may be followed by `variable` and `variable @ pattern`
16
74b04a01
XL
17error: `mut` must be attached to each individual binding
18 --> $DIR/mut-patterns.rs:12:9
19 |
20LL | let mut (x @ y) = 0;
21 | ^^^^^^^^^^^ help: add `mut` to each binding: `(mut x @ mut y)`
22 |
23 = note: `mut` may be followed by `variable` and `variable @ pattern`
24
e1599b0c 25error: `mut` on a binding may not be repeated
74b04a01 26 --> $DIR/mut-patterns.rs:14:13
e1599b0c
XL
27 |
28LL | let mut mut x = 0;
29 | ^^^ help: remove the additional `mut`s
30
31error: `mut` must be attached to each individual binding
74b04a01 32 --> $DIR/mut-patterns.rs:19:9
0bf4aa26 33 |
532ac7d7 34LL | let mut Foo { x: x } = Foo { x: 3 };
e1599b0c
XL
35 | ^^^^^^^^^^^^^^^^ help: add `mut` to each binding: `Foo { x: mut x }`
36 |
37 = note: `mut` may be followed by `variable` and `variable @ pattern`
38
39error: `mut` must be attached to each individual binding
74b04a01 40 --> $DIR/mut-patterns.rs:23:9
e1599b0c
XL
41 |
42LL | let mut Foo { x } = Foo { x: 3 };
43 | ^^^^^^^^^^^^^ help: add `mut` to each binding: `Foo { mut x }`
44 |
45 = note: `mut` may be followed by `variable` and `variable @ pattern`
46
47error: `mut` on a binding may not be repeated
74b04a01 48 --> $DIR/mut-patterns.rs:28:13
e1599b0c
XL
49 |
50LL | let mut mut yield(become, await) = r#yield(0, 0);
51 | ^^^ help: remove the additional `mut`s
52
53error: expected identifier, found reserved keyword `yield`
74b04a01 54 --> $DIR/mut-patterns.rs:28:17
e1599b0c
XL
55 |
56LL | let mut mut yield(become, await) = r#yield(0, 0);
57 | ^^^^^ expected identifier, found reserved keyword
e74abb32 58 |
e1599b0c
XL
59help: you can escape reserved keywords to use them as identifiers
60 |
61LL | let mut mut r#yield(become, await) = r#yield(0, 0);
62 | ^^^^^^^
63
64error: expected identifier, found reserved keyword `become`
74b04a01 65 --> $DIR/mut-patterns.rs:28:23
e1599b0c
XL
66 |
67LL | let mut mut yield(become, await) = r#yield(0, 0);
68 | ^^^^^^ expected identifier, found reserved keyword
e74abb32 69 |
e1599b0c
XL
70help: you can escape reserved keywords to use them as identifiers
71 |
72LL | let mut mut yield(r#become, await) = r#yield(0, 0);
73 | ^^^^^^^^
74
75error: expected identifier, found keyword `await`
74b04a01 76 --> $DIR/mut-patterns.rs:28:31
e1599b0c
XL
77 |
78LL | let mut mut yield(become, await) = r#yield(0, 0);
79 | ^^^^^ expected identifier, found keyword
e74abb32 80 |
e1599b0c
XL
81help: you can escape reserved keywords to use them as identifiers
82 |
83LL | let mut mut yield(become, r#await) = r#yield(0, 0);
84 | ^^^^^^^
85
86error: `mut` must be attached to each individual binding
74b04a01 87 --> $DIR/mut-patterns.rs:28:9
e1599b0c
XL
88 |
89LL | let mut mut yield(become, await) = r#yield(0, 0);
90 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add `mut` to each binding: `r#yield(mut r#become, mut r#await)`
91 |
92 = note: `mut` may be followed by `variable` and `variable @ pattern`
93
94error: `mut` must be attached to each individual binding
74b04a01 95 --> $DIR/mut-patterns.rs:37:9
e1599b0c
XL
96 |
97LL | let mut W(mut a, W(b, W(ref c, W(d, B { box f }))))
98 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add `mut` to each binding: `W(mut a, W(mut b, W(ref c, W(mut d, B { box mut f }))))`
99 |
100 = note: `mut` may be followed by `variable` and `variable @ pattern`
101
102error: expected identifier, found `x`
74b04a01 103 --> $DIR/mut-patterns.rs:44:21
e1599b0c
XL
104 |
105LL | let mut $p = 0;
106 | ^^ expected identifier
107...
108LL | foo!(x);
109 | -------- in this macro invocation
74b04a01 110 |
17df50a5 111 = note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
0bf4aa26 112
74b04a01 113error: aborting due to 13 previous errors
0bf4aa26 114