diff options
author | Mikhail Rakhmanov <[email protected]> | 2020-06-11 23:17:30 +0100 |
---|---|---|
committer | Mikhail Rakhmanov <[email protected]> | 2020-06-11 23:17:30 +0100 |
commit | a2b4385f161134955fd729087f142d54c3a5e035 (patch) | |
tree | 57340237a1bc00f3b5383881bc289d224e4c6ee3 /crates/ra_ide/src/completion/complete_keyword.rs | |
parent | f46bc12199dc88b88bd826f49d5c5af6e9caf727 (diff) |
Add few smoke tests for patterns and refactoring
Diffstat (limited to 'crates/ra_ide/src/completion/complete_keyword.rs')
-rw-r--r-- | crates/ra_ide/src/completion/complete_keyword.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_ide/src/completion/complete_keyword.rs b/crates/ra_ide/src/completion/complete_keyword.rs index 50f003949..675991154 100644 --- a/crates/ra_ide/src/completion/complete_keyword.rs +++ b/crates/ra_ide/src/completion/complete_keyword.rs | |||
@@ -65,13 +65,13 @@ pub(super) fn complete_expr_keyword(acc: &mut Completions, ctx: &CompletionConte | |||
65 | add_keyword(ctx, acc, "use", "fn $0() {}", ctx.is_new_item || ctx.block_expr_parent); | 65 | add_keyword(ctx, acc, "use", "fn $0() {}", ctx.is_new_item || ctx.block_expr_parent); |
66 | add_keyword(ctx, acc, "impl", "impl $0 {}", ctx.is_new_item); | 66 | add_keyword(ctx, acc, "impl", "impl $0 {}", ctx.is_new_item); |
67 | add_keyword(ctx, acc, "trait", "impl $0 {}", ctx.is_new_item); | 67 | add_keyword(ctx, acc, "trait", "impl $0 {}", ctx.is_new_item); |
68 | add_keyword(ctx, acc, "enum", "enum $0 {}", ctx.is_new_item && !ctx.after_unsafe); | 68 | add_keyword(ctx, acc, "enum", "enum $0 {}", ctx.is_new_item && !ctx.unsafe_is_prev); |
69 | add_keyword(ctx, acc, "struct", "struct $0 {}", ctx.is_new_item && !ctx.after_unsafe); | 69 | add_keyword(ctx, acc, "struct", "struct $0 {}", ctx.is_new_item && !ctx.unsafe_is_prev); |
70 | add_keyword(ctx, acc, "union", "union $0 {}", ctx.is_new_item && !ctx.after_unsafe); | 70 | add_keyword(ctx, acc, "union", "union $0 {}", ctx.is_new_item && !ctx.unsafe_is_prev); |
71 | add_keyword(ctx, acc, "match", "match $0 {}", ctx.block_expr_parent); | 71 | add_keyword(ctx, acc, "match", "match $0 {}", ctx.block_expr_parent); |
72 | add_keyword(ctx, acc, "loop", "loop {$0}", ctx.block_expr_parent); | 72 | add_keyword(ctx, acc, "loop", "loop {$0}", ctx.block_expr_parent); |
73 | add_keyword(ctx, acc, "while", "while $0 {}", ctx.block_expr_parent); | 73 | add_keyword(ctx, acc, "while", "while $0 {}", ctx.block_expr_parent); |
74 | add_keyword(ctx, acc, "let", "let ", ctx.after_if || ctx.block_expr_parent); | 74 | add_keyword(ctx, acc, "let", "let ", ctx.if_is_prev || ctx.block_expr_parent); |
75 | add_keyword(ctx, acc, "else", "else {$0}", ctx.after_if); | 75 | add_keyword(ctx, acc, "else", "else {$0}", ctx.after_if); |
76 | add_keyword(ctx, acc, "else if", "else if $0 {}", ctx.after_if); | 76 | add_keyword(ctx, acc, "else if", "else if $0 {}", ctx.after_if); |
77 | add_keyword(ctx, acc, "mod", "mod $0 {}", ctx.is_new_item || ctx.block_expr_parent); | 77 | add_keyword(ctx, acc, "mod", "mod $0 {}", ctx.is_new_item || ctx.block_expr_parent); |