aboutsummaryrefslogtreecommitdiff
path: root/docs/user
diff options
context:
space:
mode:
Diffstat (limited to 'docs/user')
-rw-r--r--docs/user/assists.md17
1 files changed, 17 insertions, 0 deletions
diff --git a/docs/user/assists.md b/docs/user/assists.md
index 8e2e8cc94..182f07e98 100644
--- a/docs/user/assists.md
+++ b/docs/user/assists.md
@@ -245,3 +245,20 @@ fn main() {
245 (1 + 2) * 4; 245 (1 + 2) * 4;
246} 246}
247``` 247```
248
249## `introduce_variable`
250
251Extracts subexpression into a variable.
252
253```rust
254// BEFORE
255fn main() {
256 <|>(1 + 2)<|> * 4;
257}
258
259// AFTER
260fn main() {
261 let var_name = (1 + 2);
262 var_name * 4;
263}
264```