From bf7a35294d92381ce85cbb6e8a300a270a4d6a81 Mon Sep 17 00:00:00 2001 From: Kan-Ru Chen Date: Sun, 23 Jun 2019 10:41:43 +0900 Subject: Add box postfix completion --- crates/ra_ide_api/src/completion/complete_postfix.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'crates/ra_ide_api/src/completion/complete_postfix.rs') 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) { ) .add_to(acc); postfix_snippet(ctx, "dbg", "dbg!(expr)", &format!("dbg!({})", receiver_text)).add_to(acc); + postfix_snippet(ctx, "box", "Box::new(expr)", &format!("Box::new({})", receiver_text)) + .add_to(acc); } } -- cgit v1.2.3