fork/rust

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

borsAuto merge of #71365 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4fb7144ed15

1.43.0
4.0 KiB114 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` 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
25error: `mut` on a binding may not be repeated
26  --> $DIR/mut-patterns.rs:14:13
27   |
28LL |     let mut mut x = 0;
29   |             ^^^ help: remove the additional `mut`s
30
31error: `mut` must be attached to each individual binding
32  --> $DIR/mut-patterns.rs:19:9
33   |
34LL |     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
39error: `mut` must be attached to each individual binding
40  --> $DIR/mut-patterns.rs:23:9
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
48  --> $DIR/mut-patterns.rs:28:13
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`
54  --> $DIR/mut-patterns.rs:28:17
55   |
56LL |     let mut mut yield(become, await) = r#yield(0, 0);
57   |                 ^^^^^ expected identifier, found reserved keyword
58   |
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`
65  --> $DIR/mut-patterns.rs:28:23
66   |
67LL |     let mut mut yield(become, await) = r#yield(0, 0);
68   |                       ^^^^^^ expected identifier, found reserved keyword
69   |
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`
76  --> $DIR/mut-patterns.rs:28:31
77   |
78LL |     let mut mut yield(become, await) = r#yield(0, 0);
79   |                               ^^^^^ expected identifier, found keyword
80   |
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
87  --> $DIR/mut-patterns.rs:28:9
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
95  --> $DIR/mut-patterns.rs:37:9
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`
103  --> $DIR/mut-patterns.rs:44:21
104   |
105LL |             let mut $p = 0;
106   |                     ^^ expected identifier
107...
108LL |     foo!(x);
109   |     -------- in this macro invocation
110   |
111   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
112
113error: aborting due to 13 previous errors
114