aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide')
-rw-r--r--crates/ra_ide/src/completion/completion_context.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/ra_ide/src/completion/completion_context.rs b/crates/ra_ide/src/completion/completion_context.rs
index e7a8c78d0..40535c09e 100644
--- a/crates/ra_ide/src/completion/completion_context.rs
+++ b/crates/ra_ide/src/completion/completion_context.rs
@@ -119,11 +119,15 @@ impl<'a> CompletionContext<'a> {
119 { 119 {
120 break; 120 break;
121 } 121 }
122 let hypothetical_args = match macro_call_with_fake_ident.token_tree() {
123 Some(tt) => tt,
124 None => break,
125 };
122 if let (Some(actual_expansion), Some(hypothetical_expansion)) = ( 126 if let (Some(actual_expansion), Some(hypothetical_expansion)) = (
123 ctx.sema.expand(&actual_macro_call), 127 ctx.sema.expand(&actual_macro_call),
124 ctx.sema.expand_hypothetical( 128 ctx.sema.expand_hypothetical(
125 &actual_macro_call, 129 &actual_macro_call,
126 &macro_call_with_fake_ident, 130 &hypothetical_args,
127 fake_ident_token, 131 fake_ident_token,
128 ), 132 ),
129 ) { 133 ) {