fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #69444 - pietroalbini:stable-next-final-v2-new, r=pietroalbinif3e1a954d2e

1.41.1
3.6 KiB104 linesraw
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
17error: `mut` on a binding may not be repeated
18  --> $DIR/mut-patterns.rs:12:13
19   |
20LL |     let mut mut x = 0;
21   |             ^^^ help: remove the additional `mut`s
22
23error: `mut` must be attached to each individual binding
24  --> $DIR/mut-patterns.rs:17:9
25   |
26LL |     let mut Foo { x: x } = Foo { x: 3 };
27   |         ^^^^^^^^^^^^^^^^ help: add `mut` to each binding: `Foo { x: mut x }`
28   |
29   = note: `mut` may be followed by `variable` and `variable @ pattern`
30
31error: `mut` must be attached to each individual binding
32  --> $DIR/mut-patterns.rs:21:9
33   |
34LL |     let mut Foo { x } = Foo { x: 3 };
35   |         ^^^^^^^^^^^^^ help: add `mut` to each binding: `Foo { mut x }`
36   |
37   = note: `mut` may be followed by `variable` and `variable @ pattern`
38
39error: `mut` on a binding may not be repeated
40  --> $DIR/mut-patterns.rs:26:13
41   |
42LL |     let mut mut yield(become, await) = r#yield(0, 0);
43   |             ^^^ help: remove the additional `mut`s
44
45error: expected identifier, found reserved keyword `yield`
46  --> $DIR/mut-patterns.rs:26:17
47   |
48LL |     let mut mut yield(become, await) = r#yield(0, 0);
49   |                 ^^^^^ expected identifier, found reserved keyword
50   |
51help: you can escape reserved keywords to use them as identifiers
52   |
53LL |     let mut mut r#yield(become, await) = r#yield(0, 0);
54   |                 ^^^^^^^
55
56error: expected identifier, found reserved keyword `become`
57  --> $DIR/mut-patterns.rs:26:23
58   |
59LL |     let mut mut yield(become, await) = r#yield(0, 0);
60   |                       ^^^^^^ expected identifier, found reserved keyword
61   |
62help: you can escape reserved keywords to use them as identifiers
63   |
64LL |     let mut mut yield(r#become, await) = r#yield(0, 0);
65   |                       ^^^^^^^^
66
67error: expected identifier, found keyword `await`
68  --> $DIR/mut-patterns.rs:26:31
69   |
70LL |     let mut mut yield(become, await) = r#yield(0, 0);
71   |                               ^^^^^ expected identifier, found keyword
72   |
73help: you can escape reserved keywords to use them as identifiers
74   |
75LL |     let mut mut yield(become, r#await) = r#yield(0, 0);
76   |                               ^^^^^^^
77
78error: `mut` must be attached to each individual binding
79  --> $DIR/mut-patterns.rs:26:9
80   |
81LL |     let mut mut yield(become, await) = r#yield(0, 0);
82   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add `mut` to each binding: `r#yield(mut r#become, mut r#await)`
83   |
84   = note: `mut` may be followed by `variable` and `variable @ pattern`
85
86error: `mut` must be attached to each individual binding
87  --> $DIR/mut-patterns.rs:35:9
88   |
89LL |     let mut W(mut a, W(b, W(ref c, W(d, B { box f }))))
90   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add `mut` to each binding: `W(mut a, W(mut b, W(ref c, W(mut d, B { box mut f }))))`
91   |
92   = note: `mut` may be followed by `variable` and `variable @ pattern`
93
94error: expected identifier, found `x`
95  --> $DIR/mut-patterns.rs:42:21
96   |
97LL |             let mut $p = 0;
98   |                     ^^ expected identifier
99...
100LL |     foo!(x);
101   |     -------- in this macro invocation
102
103error: aborting due to 12 previous errors
104