diff options
author | Ekaterina Babshukova <[email protected]> | 2019-09-04 17:48:45 +0100 |
---|---|---|
committer | Ekaterina Babshukova <[email protected]> | 2019-09-05 11:29:13 +0100 |
commit | acb89d2be12f6a1556d9a366231604371a62fdcd (patch) | |
tree | c151ac6fd66c7524f2a9c21482f53cfee20d828d /docs | |
parent | 36d7b75c957d4ebf8e8f75ca59c79866cc702df4 (diff) |
add assist to move type bounds to where clause
Diffstat (limited to 'docs')
-rw-r--r-- | docs/user/features.md | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/user/features.md b/docs/user/features.md index b6e6008c4..1034a5117 100644 --- a/docs/user/features.md +++ b/docs/user/features.md | |||
@@ -435,6 +435,16 @@ fn f() { | |||
435 | } | 435 | } |
436 | ``` | 436 | ``` |
437 | 437 | ||
438 | - Move type bounds to where clause | ||
439 | |||
440 | ```rust | ||
441 | // before: | ||
442 | fn foo<T: u32, F: FnOnce(T) -> T>() {} | ||
443 | |||
444 | // after: | ||
445 | fn foo<T, F>() where T: u32, F: FnOnce(T) -> T {} | ||
446 | ``` | ||
447 | |||
438 | ### Magic Completions | 448 | ### Magic Completions |
439 | 449 | ||
440 | In addition to usual reference completion, rust-analyzer provides some ✨magic✨ | 450 | In addition to usual reference completion, rust-analyzer provides some ✨magic✨ |