From 13451d3dc4477cc1dab38d6d66643de4bd4aa59e Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 17 Oct 2020 23:43:13 +0200 Subject: Complete methods when receiver is a macro --- crates/ide/src/completion/complete_dot.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'crates/ide/src/completion') diff --git a/crates/ide/src/completion/complete_dot.rs b/crates/ide/src/completion/complete_dot.rs index 0b9f1798a..f0f9a7f1d 100644 --- a/crates/ide/src/completion/complete_dot.rs +++ b/crates/ide/src/completion/complete_dot.rs @@ -413,4 +413,19 @@ fn foo() { "#]], ); } + + #[test] + fn completes_method_call_when_receiver_is_a_macro_call() { + check( + r#" +struct S; +impl S { fn foo(&self) {} } +macro_rules! make_s { () => { S }; } +fn main() { make_s!().f<|>; } +"#, + expect![[r#" + me foo() fn foo(&self) + "#]], + ) + } } -- cgit v1.2.3