fork/rust

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

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

1.39.0
3.6 KiB101 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
50help: you can escape reserved keywords to use them as identifiers
51   |
52LL |     let mut mut r#yield(become, await) = r#yield(0, 0);
53   |                 ^^^^^^^
54
55error: expected identifier, found reserved keyword `become`
56  --> $DIR/mut-patterns.rs:26:23
57   |
58LL |     let mut mut yield(become, await) = r#yield(0, 0);
59   |                       ^^^^^^ expected identifier, found reserved keyword
60help: you can escape reserved keywords to use them as identifiers
61   |
62LL |     let mut mut yield(r#become, await) = r#yield(0, 0);
63   |                       ^^^^^^^^
64
65error: expected identifier, found keyword `await`
66  --> $DIR/mut-patterns.rs:26:31
67   |
68LL |     let mut mut yield(become, await) = r#yield(0, 0);
69   |                               ^^^^^ expected identifier, found keyword
70help: you can escape reserved keywords to use them as identifiers
71   |
72LL |     let mut mut yield(become, r#await) = r#yield(0, 0);
73   |                               ^^^^^^^
74
75error: `mut` must be attached to each individual binding
76  --> $DIR/mut-patterns.rs:26:9
77   |
78LL |     let mut mut yield(become, await) = r#yield(0, 0);
79   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add `mut` to each binding: `r#yield(mut r#become, mut r#await)`
80   |
81   = note: `mut` may be followed by `variable` and `variable @ pattern`
82
83error: `mut` must be attached to each individual binding
84  --> $DIR/mut-patterns.rs:35:9
85   |
86LL |     let mut W(mut a, W(b, W(ref c, W(d, B { box f }))))
87   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add `mut` to each binding: `W(mut a, W(mut b, W(ref c, W(mut d, B { box mut f }))))`
88   |
89   = note: `mut` may be followed by `variable` and `variable @ pattern`
90
91error: expected identifier, found `x`
92  --> $DIR/mut-patterns.rs:42:21
93   |
94LL |             let mut $p = 0;
95   |                     ^^ expected identifier
96...
97LL |     foo!(x);
98   |     -------- in this macro invocation
99
100error: aborting due to 12 previous errors
101