aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-10-26 17:58:18 +0100
committerAleksey Kladov <[email protected]>2019-10-26 18:57:23 +0100
commit4a83aae09849123dbbbc5726b07c2601a14397a8 (patch)
treeb8944447b98e8b0b25ac95d0465210312bf4cd57 /docs
parent733fd64260793a0f7335e4f75ba9197d5fa98b70 (diff)
support range selection in assist docs
Diffstat (limited to 'docs')
-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```