diff options
author | Jonas Schievink <[email protected]> | 2021-02-23 13:54:01 +0000 |
---|---|---|
committer | Jonas Schievink <[email protected]> | 2021-02-23 13:54:01 +0000 |
commit | cf456d72dbdc44dfde9b79b632ee952ea161d5c4 (patch) | |
tree | 95e1295d23518d6469449f99cd61fa1136f1c051 /crates/ide_completion | |
parent | 27ed1ebf8997cea55fb446ce249b390607b84105 (diff) |
Add test
Diffstat (limited to 'crates/ide_completion')
-rw-r--r-- | crates/ide_completion/src/completions/dot.rs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/crates/ide_completion/src/completions/dot.rs b/crates/ide_completion/src/completions/dot.rs index 0880a3830..084d7721d 100644 --- a/crates/ide_completion/src/completions/dot.rs +++ b/crates/ide_completion/src/completions/dot.rs | |||
@@ -428,4 +428,32 @@ fn main() { make_s!().f$0; } | |||
428 | "#]], | 428 | "#]], |
429 | ) | 429 | ) |
430 | } | 430 | } |
431 | |||
432 | #[test] | ||
433 | fn completes_after_macro_call_in_submodule() { | ||
434 | check( | ||
435 | r#" | ||
436 | macro_rules! empty { | ||
437 | () => {}; | ||
438 | } | ||
439 | |||
440 | mod foo { | ||
441 | #[derive(Debug, Default)] | ||
442 | struct Template2 {} | ||
443 | |||
444 | impl Template2 { | ||
445 | fn private(&self) {} | ||
446 | } | ||
447 | fn baz() { | ||
448 | let goo: Template2 = Template2 {}; | ||
449 | empty!(); | ||
450 | goo.$0 | ||
451 | } | ||
452 | } | ||
453 | "#, | ||
454 | expect![[r#" | ||
455 | me private() -> () | ||
456 | "#]], | ||
457 | ); | ||
458 | } | ||
431 | } | 459 | } |