diff --git a/docs/user/features.md b/docs/user/features.md index b9d2aa84f8b..59ee3dbd55d 100644 --- a/docs/user/features.md +++ b/docs/user/features.md @@ -270,6 +270,21 @@ fn foo() { } ``` +- Inline local variable: + +```rust +// before: +fn foo() { + let a<|> = 1 + 1; + let b = a * 10; +} + +// after: +fn foo() { + let b = (1 + 1) * 10; +} +``` + -- Remove `dbg!` ```rust