aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2020-03-08 10:02:14 +0000
committerFlorian Diebold <[email protected]>2020-03-08 10:10:48 +0000
commitafdf08e964345ac4a884a5630772611ba81f6969 (patch)
treeb72b06310a3cd9bcec2234b0f38ff93eb6a8feb0 /crates/ra_ide
parentf617455d10084da30a13cc49ffdd6b86c6049ba1 (diff)
Move hypothetical expansion to hir_expand
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 ) {