aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-10-26 18:58:12 +0100
committerGitHub <[email protected]>2019-10-26 18:58:12 +0100
commit106004139375b64817145d8279cd7904a477c637 (patch)
treeb8944447b98e8b0b25ac95d0465210312bf4cd57 /docs
parent733fd64260793a0f7335e4f75ba9197d5fa98b70 (diff)
parent4a83aae09849123dbbbc5726b07c2601a14397a8 (diff)
Merge #2078
2078: support range selection in assist docs r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
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```