diff options
-rw-r--r-- | docs/user/features.md | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/docs/user/features.md b/docs/user/features.md index b9d2aa84f..7173d88e9 100644 --- a/docs/user/features.md +++ b/docs/user/features.md | |||
@@ -210,7 +210,7 @@ fn main() { | |||
210 | } | 210 | } |
211 | ``` | 211 | ``` |
212 | 212 | ||
213 | -- Fill struct fields | 213 | - Fill struct fields |
214 | 214 | ||
215 | ```rust | 215 | ```rust |
216 | // before: | 216 | // before: |
@@ -270,7 +270,22 @@ fn foo() { | |||
270 | } | 270 | } |
271 | ``` | 271 | ``` |
272 | 272 | ||
273 | -- Remove `dbg!` | 273 | - Inline local variable: |
274 | |||
275 | ```rust | ||
276 | // before: | ||
277 | fn foo() { | ||
278 | let a<|> = 1 + 1; | ||
279 | let b = a * 10; | ||
280 | } | ||
281 | |||
282 | // after: | ||
283 | fn foo() { | ||
284 | let b = (1 + 1) * 10; | ||
285 | } | ||
286 | ``` | ||
287 | |||
288 | - Remove `dbg!` | ||
274 | 289 | ||
275 | ```rust | 290 | ```rust |
276 | // before: | 291 | // before: |