aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide/src')
-rw-r--r--crates/ide/src/completion/complete_postfix.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/crates/ide/src/completion/complete_postfix.rs b/crates/ide/src/completion/complete_postfix.rs
index 84c4e129d..c7c3f51a8 100644
--- a/crates/ide/src/completion/complete_postfix.rs
+++ b/crates/ide/src/completion/complete_postfix.rs
@@ -179,6 +179,16 @@ pub(super) fn complete_postfix(acc: &mut Completions, ctx: &CompletionContext) {
179 ctx, 179 ctx,
180 cap, 180 cap,
181 &dot_receiver, 181 &dot_receiver,
182 "ok",
183 "Ok(expr)",
184 &format!("Ok({})", receiver_text),
185 )
186 .add_to(acc);
187
188 postfix_snippet(
189 ctx,
190 cap,
191 &dot_receiver,
182 "dbg", 192 "dbg",
183 "dbg!(expr)", 193 "dbg!(expr)",
184 &format!("dbg!({})", receiver_text), 194 &format!("dbg!({})", receiver_text),
@@ -266,6 +276,7 @@ fn main() {
266 sn if if expr {} 276 sn if if expr {}
267 sn match match expr {} 277 sn match match expr {}
268 sn not !expr 278 sn not !expr
279 sn ok Ok(expr)
269 sn ref &expr 280 sn ref &expr
270 sn refm &mut expr 281 sn refm &mut expr
271 sn while while expr {} 282 sn while while expr {}
@@ -287,6 +298,7 @@ fn main() {
287 sn call function(expr) 298 sn call function(expr)
288 sn dbg dbg!(expr) 299 sn dbg dbg!(expr)
289 sn match match expr {} 300 sn match match expr {}
301 sn ok Ok(expr)
290 sn ref &expr 302 sn ref &expr
291 sn refm &mut expr 303 sn refm &mut expr
292 "#]], 304 "#]],