Commit 305bd14
committed
Improve examples in wildcard capturing section
Some of the examples in this section did not really prove the claim
they were making; let's adjust them to do this. Let's also simplify
and minimize them to match the style of other recent examples we're
adding and that of the ones that will follow in the section below.
One particular stylistic conundrum is what to do about comments like
this:
// ERROR: Borrow of moved value.
Normally, our stylistic convention would be to capitalize after the
comma in this case and end with a period. That's what we'd do, e.g.,
in a similar case like this:
// OK: The value can be moved here.
But, of course, `rustc` doesn't capitalize and add a period to these
kind of error messages, making it tempting to follow that lead.
Since we already don't always use the same error messages that `rustc`
does -- it's not a goal to match those -- it seems better to be
internally consistent with our own documentation norms. Let's
capitalize and add the period. We'll later add this to the style
guide and work to align the document with this.1 parent 8f61618 commit 305bd14
1 file changed
+19
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
193 | | - | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
194 | 195 | | |
195 | | - | |
| 196 | + | |
196 | 197 | | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
| 198 | + | |
| 199 | + | |
201 | 200 | | |
| 201 | + | |
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
| |||
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
253 | | - | |
254 | | - | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
255 | 256 | | |
256 | | - | |
| 257 | + | |
257 | 258 | | |
258 | | - | |
259 | | - | |
260 | | - | |
| 259 | + | |
| 260 | + | |
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
| 268 | + | |
| 269 | + | |
272 | 270 | | |
273 | | - | |
| 271 | + | |
274 | 272 | | |
275 | | - | |
276 | | - | |
| 273 | + | |
277 | 274 | | |
278 | 275 | | |
279 | 276 | | |
280 | 277 | | |
281 | 278 | | |
282 | 279 | | |
283 | | - | |
| 280 | + | |
284 | 281 | | |
285 | | - | |
| 282 | + | |
286 | 283 | | |
287 | 284 | | |
288 | 285 | | |
| |||
0 commit comments