diff options
author | Kan-Ru Chen <[email protected]> | 2019-06-23 02:41:43 +0100 |
---|---|---|
committer | Kan-Ru Chen <[email protected]> | 2019-06-23 14:18:25 +0100 |
commit | bf7a35294d92381ce85cbb6e8a300a270a4d6a81 (patch) | |
tree | 4502ff37bacbc6e8855e8126f6b9b5de3af4fb28 /crates/ra_ide_api/src/completion/complete_postfix.rs | |
parent | 7d79be32801036c39507fe96f87ed316e3934662 (diff) |
Add box postfix completion
Diffstat (limited to 'crates/ra_ide_api/src/completion/complete_postfix.rs')
-rw-r--r-- | crates/ra_ide_api/src/completion/complete_postfix.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crates/ra_ide_api/src/completion/complete_postfix.rs b/crates/ra_ide_api/src/completion/complete_postfix.rs index 278b1b797..e20a12e2a 100644 --- a/crates/ra_ide_api/src/completion/complete_postfix.rs +++ b/crates/ra_ide_api/src/completion/complete_postfix.rs | |||
@@ -51,6 +51,8 @@ pub(super) fn complete_postfix(acc: &mut Completions, ctx: &CompletionContext) { | |||
51 | ) | 51 | ) |
52 | .add_to(acc); | 52 | .add_to(acc); |
53 | postfix_snippet(ctx, "dbg", "dbg!(expr)", &format!("dbg!({})", receiver_text)).add_to(acc); | 53 | postfix_snippet(ctx, "dbg", "dbg!(expr)", &format!("dbg!({})", receiver_text)).add_to(acc); |
54 | postfix_snippet(ctx, "box", "Box::new(expr)", &format!("Box::new({})", receiver_text)) | ||
55 | .add_to(acc); | ||
54 | } | 56 | } |
55 | } | 57 | } |
56 | 58 | ||