File: mut-patterns.stderr

package info (click to toggle)
rustc 1.85.0%2Bdfsg3-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental, sid, trixie
  • size: 893,396 kB
  • sloc: xml: 158,127; python: 35,830; javascript: 19,497; cpp: 19,002; sh: 17,245; ansic: 13,127; asm: 4,376; makefile: 1,051; perl: 29; lisp: 29; ruby: 19; sql: 11
file content (169 lines) | stat: -rw-r--r-- 4,870 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
error: `mut` must be followed by a named binding
  --> $DIR/mut-patterns.rs:9:9
   |
LL |     let mut _ = 0;
   |         ^^^^
   |
   = note: `mut` may be followed by `variable` and `variable @ pattern`
help: remove the `mut` prefix
   |
LL -     let mut _ = 0;
LL +     let _ = 0;
   |

error: `mut` must be followed by a named binding
  --> $DIR/mut-patterns.rs:10:9
   |
LL |     let mut (_, _) = (0, 0);
   |         ^^^^
   |
   = note: `mut` may be followed by `variable` and `variable @ pattern`
help: remove the `mut` prefix
   |
LL -     let mut (_, _) = (0, 0);
LL +     let (_, _) = (0, 0);
   |

error: `mut` must be attached to each individual binding
  --> $DIR/mut-patterns.rs:12:9
   |
LL |     let mut (x @ y) = 0;
   |         ^^^^^^^^^^^
   |
   = note: `mut` may be followed by `variable` and `variable @ pattern`
help: add `mut` to each binding
   |
LL |     let (mut x @ mut y) = 0;
   |         ~~~~~~~~~~~~~~~

error: `mut` on a binding may not be repeated
  --> $DIR/mut-patterns.rs:14:13
   |
LL |     let mut mut x = 0;
   |             ^^^
   |
help: remove the additional `mut`s
   |
LL -     let mut mut x = 0;
LL +     let mut x = 0;
   |

error: `mut` on a binding may not be repeated
  --> $DIR/mut-patterns.rs:18:13
   |
LL |     let mut mut mut mut mut x = 0;
   |             ^^^^^^^^^^^^^^^
   |
help: remove the additional `mut`s
   |
LL -     let mut mut mut mut mut x = 0;
LL +     let mut x = 0;
   |

error: `mut` must be attached to each individual binding
  --> $DIR/mut-patterns.rs:23:9
   |
LL |     let mut Foo { x: x } = Foo { x: 3 };
   |         ^^^^^^^^^^^^^^^^
   |
   = note: `mut` may be followed by `variable` and `variable @ pattern`
help: add `mut` to each binding
   |
LL |     let Foo { x: mut x } = Foo { x: 3 };
   |         ~~~~~~~~~~~~~~~~

error: `mut` must be attached to each individual binding
  --> $DIR/mut-patterns.rs:27:9
   |
LL |     let mut Foo { x } = Foo { x: 3 };
   |         ^^^^^^^^^^^^^
   |
   = note: `mut` may be followed by `variable` and `variable @ pattern`
help: add `mut` to each binding
   |
LL |     let Foo { mut x } = Foo { x: 3 };
   |         ~~~~~~~~~~~~~

error: `mut` on a binding may not be repeated
  --> $DIR/mut-patterns.rs:32:13
   |
LL |     let mut mut yield(become, await) = r#yield(0, 0);
   |             ^^^
   |
help: remove the additional `mut`s
   |
LL -     let mut mut yield(become, await) = r#yield(0, 0);
LL +     let mut yield(become, await) = r#yield(0, 0);
   |

error: expected identifier, found reserved keyword `yield`
  --> $DIR/mut-patterns.rs:32:17
   |
LL |     let mut mut yield(become, await) = r#yield(0, 0);
   |                 ^^^^^ expected identifier, found reserved keyword
   |
help: escape `yield` to use it as an identifier
   |
LL |     let mut mut r#yield(become, await) = r#yield(0, 0);
   |                 ++

error: expected identifier, found reserved keyword `become`
  --> $DIR/mut-patterns.rs:32:23
   |
LL |     let mut mut yield(become, await) = r#yield(0, 0);
   |                       ^^^^^^ expected identifier, found reserved keyword
   |
help: escape `become` to use it as an identifier
   |
LL |     let mut mut yield(r#become, await) = r#yield(0, 0);
   |                       ++

error: expected identifier, found keyword `await`
  --> $DIR/mut-patterns.rs:32:31
   |
LL |     let mut mut yield(become, await) = r#yield(0, 0);
   |                               ^^^^^ expected identifier, found keyword
   |
help: escape `await` to use it as an identifier
   |
LL |     let mut mut yield(become, r#await) = r#yield(0, 0);
   |                               ++

error: `mut` must be followed by a named binding
  --> $DIR/mut-patterns.rs:32:9
   |
LL |     let mut mut yield(become, await) = r#yield(0, 0);
   |         ^^^^^^^^
   |
   = note: `mut` may be followed by `variable` and `variable @ pattern`
help: remove the `mut` prefix
   |
LL -     let mut mut yield(become, await) = r#yield(0, 0);
LL +     let yield(become, await) = r#yield(0, 0);
   |

error: `mut` must be attached to each individual binding
  --> $DIR/mut-patterns.rs:41:9
   |
LL |     let mut W(mut a, W(b, W(ref c, W(d, B { box f }))))
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `mut` may be followed by `variable` and `variable @ pattern`
help: add `mut` to each binding
   |
LL |     let W(mut a, W(mut b, W(ref c, W(mut d, B { box mut f }))))
   |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error: expected identifier, found `x`
  --> $DIR/mut-patterns.rs:48:21
   |
LL |             let mut $p = 0;
   |                     ^^ expected identifier
...
LL |     foo!(x);
   |     ------- in this macro invocation
   |
   = note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 14 previous errors