]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/mut-patterns.stderr
Rollup merge of #92024 - pcwalton:per-codegen-unit-names, r=davidtwco
[rust.git] / src / test / ui / parser / mut-patterns.stderr
1 error: `mut` must be followed by a named binding
2   --> $DIR/mut-patterns.rs:9:9
3    |
4 LL |     let mut _ = 0;
5    |         ^^^^^ help: remove the `mut` prefix: `_`
6    |
7    = note: `mut` may be followed by `variable` and `variable @ pattern`
8
9 error: `mut` must be followed by a named binding
10   --> $DIR/mut-patterns.rs:10:9
11    |
12 LL |     let mut (_, _) = (0, 0);
13    |         ^^^^^^^^^^ help: remove the `mut` prefix: `(_, _)`
14    |
15    = note: `mut` may be followed by `variable` and `variable @ pattern`
16
17 error: `mut` must be attached to each individual binding
18   --> $DIR/mut-patterns.rs:12:9
19    |
20 LL |     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
25 error: `mut` on a binding may not be repeated
26   --> $DIR/mut-patterns.rs:14:13
27    |
28 LL |     let mut mut x = 0;
29    |             ^^^ help: remove the additional `mut`s
30
31 error: `mut` must be attached to each individual binding
32   --> $DIR/mut-patterns.rs:19:9
33    |
34 LL |     let mut Foo { x: x } = Foo { x: 3 };
35    |         ^^^^^^^^^^^^^^^^ help: add `mut` to each binding: `Foo { x: mut x }`
36    |
37    = note: `mut` may be followed by `variable` and `variable @ pattern`
38
39 error: `mut` must be attached to each individual binding
40   --> $DIR/mut-patterns.rs:23:9
41    |
42 LL |     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
47 error: `mut` on a binding may not be repeated
48   --> $DIR/mut-patterns.rs:28:13
49    |
50 LL |     let mut mut yield(become, await) = r#yield(0, 0);
51    |             ^^^ help: remove the additional `mut`s
52
53 error: expected identifier, found reserved keyword `yield`
54   --> $DIR/mut-patterns.rs:28:17
55    |
56 LL |     let mut mut yield(become, await) = r#yield(0, 0);
57    |                 ^^^^^ expected identifier, found reserved keyword
58    |
59 help: you can escape reserved keywords to use them as identifiers
60    |
61 LL |     let mut mut r#yield(become, await) = r#yield(0, 0);
62    |                 ~~~~~~~
63
64 error: expected identifier, found reserved keyword `become`
65   --> $DIR/mut-patterns.rs:28:23
66    |
67 LL |     let mut mut yield(become, await) = r#yield(0, 0);
68    |                       ^^^^^^ expected identifier, found reserved keyword
69    |
70 help: you can escape reserved keywords to use them as identifiers
71    |
72 LL |     let mut mut yield(r#become, await) = r#yield(0, 0);
73    |                       ~~~~~~~~
74
75 error: expected identifier, found keyword `await`
76   --> $DIR/mut-patterns.rs:28:31
77    |
78 LL |     let mut mut yield(become, await) = r#yield(0, 0);
79    |                               ^^^^^ expected identifier, found keyword
80    |
81 help: you can escape reserved keywords to use them as identifiers
82    |
83 LL |     let mut mut yield(become, r#await) = r#yield(0, 0);
84    |                               ~~~~~~~
85
86 error: `mut` must be attached to each individual binding
87   --> $DIR/mut-patterns.rs:28:9
88    |
89 LL |     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
94 error: `mut` must be attached to each individual binding
95   --> $DIR/mut-patterns.rs:37:9
96    |
97 LL |     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
102 error: expected identifier, found `x`
103   --> $DIR/mut-patterns.rs:44:21
104    |
105 LL |             let mut $p = 0;
106    |                     ^^ expected identifier
107 ...
108 LL |     foo!(x);
109    |     ------- in this macro invocation
110    |
111    = note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
112
113 error: aborting due to 13 previous errors
114