diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-09-05 11:39:35 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2019-09-05 11:39:35 +0100 |
commit | 82f3317e2b012864833be5b89a323b252db0487a (patch) | |
tree | 965936cdcd0ecd9b7256539b6e7245eaa6f9bf66 /docs | |
parent | 6702f5b7b5b7ddc23398c1b5d77891e9b4b1345a (diff) | |
parent | acb89d2be12f6a1556d9a366231604371a62fdcd (diff) |
Merge #1761
1761: "move type bounds to where clause" assist r=matklad a=viorina
Co-authored-by: Ekaterina Babshukova <[email protected]>
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✨ |