diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-10-17 23:45:32 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-10-17 23:45:32 +0100 |
commit | aed7b6d98aab8c222124d336b69f83ed4f1dfb2d (patch) | |
tree | 425f5c6dda7b123b0654534387cb6dd351868847 /crates/ide/src | |
parent | 63956e509eea1aba1a303c58bf60d068863a61dd (diff) | |
parent | 13451d3dc4477cc1dab38d6d66643de4bd4aa59e (diff) |
Merge #6271
6271: Complete methods when receiver is a macro r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ide/src')
-rw-r--r-- | crates/ide/src/completion/complete_dot.rs | 15 |
1 files changed, 15 insertions, 0 deletions
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() { | |||
413 | "#]], | 413 | "#]], |
414 | ); | 414 | ); |
415 | } | 415 | } |
416 | |||
417 | #[test] | ||
418 | fn completes_method_call_when_receiver_is_a_macro_call() { | ||
419 | check( | ||
420 | r#" | ||
421 | struct S; | ||
422 | impl S { fn foo(&self) {} } | ||
423 | macro_rules! make_s { () => { S }; } | ||
424 | fn main() { make_s!().f<|>; } | ||
425 | "#, | ||
426 | expect![[r#" | ||
427 | me foo() fn foo(&self) | ||
428 | "#]], | ||
429 | ) | ||
430 | } | ||
416 | } | 431 | } |