aboutsummaryrefslogtreecommitdiff
path: root/docs/user/features.md
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-09-20 11:40:15 +0100
committerGitHub <[email protected]>2019-09-20 11:40:15 +0100
commitb19da133eec13ac8943b708d17410e3a8a6b6193 (patch)
tree2e1b540b6914c4b7e11b7b51d878a4d45aea859f /docs/user/features.md
parent4101c15ddbae860b86cd2ed17b09b7526ef17de8 (diff)
parentce4d84365632ea379caa6c79580b1e458dde39f7 (diff)
Merge #1850
1850: feat(assists): raw string <-> usual string manipulation r=matklad a=Geobert Fixes #1730 Co-authored-by: Geobert Quach <[email protected]>
Diffstat (limited to 'docs/user/features.md')
-rw-r--r--docs/user/features.md56
1 files changed, 56 insertions, 0 deletions
diff --git a/docs/user/features.md b/docs/user/features.md
index 1034a5117..93e565315 100644
--- a/docs/user/features.md
+++ b/docs/user/features.md
@@ -445,6 +445,62 @@ fn foo<T: u32, F: FnOnce(T) -> T>() {}
445fn foo<T, F>() where T: u32, F: FnOnce(T) -> T {} 445fn foo<T, F>() where T: u32, F: FnOnce(T) -> T {}
446``` 446```
447 447
448- Make raw string
449
450```rust
451// before:
452fn f() {
453 let s = <|>"abcd";
454}
455
456// after:
457fn f() {
458 let s = <|>r"abcd";
459}
460```
461
462- Make usual string
463
464```rust
465// before:
466fn f() {
467 let s = <|>r#"abcd"#;
468}
469
470// after:
471fn f() {
472 let s = <|>"abcd";
473}
474```
475
476- Add hash
477
478```rust
479// before:
480fn f() {
481 let s = <|>r"abcd";
482}
483
484// after:
485fn f() {
486 let s = <|>r#"abcd"#;
487}
488```
489
490- Remove hash
491
492```rust
493// before:
494fn f() {
495 let s = <|>r#"abcd"#;
496}
497
498// after:
499fn f() {
500 let s = <|>r"abcd";
501}
502```
503
448### Magic Completions 504### Magic Completions
449 505
450In addition to usual reference completion, rust-analyzer provides some ✨magic✨ 506In addition to usual reference completion, rust-analyzer provides some ✨magic✨