aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgfreezy <[email protected]>2019-03-25 15:14:30 +0000
committergfreezy <[email protected]>2019-03-25 15:14:30 +0000
commit2ca1b2bc8fd14cb78c869551c35713603ca785f3 (patch)
treed26a0b5d99c3e7326b3c5d7e9a8d930f1e47817b
parentd88a96bd05fdfdc6986e7807c93400af2cf6fa0f (diff)
add desc and examples for inline variable action
-rw-r--r--docs/user/features.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/docs/user/features.md b/docs/user/features.md
index b9d2aa84f..59ee3dbd5 100644
--- a/docs/user/features.md
+++ b/docs/user/features.md
@@ -270,6 +270,21 @@ fn foo() {
270} 270}
271``` 271```
272 272
273- Inline local variable:
274
275```rust
276// before:
277fn foo() {
278 let a<|> = 1 + 1;
279 let b = a * 10;
280}
281
282// after:
283fn foo() {
284 let b = (1 + 1) * 10;
285}
286```
287
273-- Remove `dbg!` 288-- Remove `dbg!`
274 289
275```rust 290```rust