From cf456d72dbdc44dfde9b79b632ee952ea161d5c4 Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Tue, 23 Feb 2021 14:54:01 +0100 Subject: Add test --- crates/ide_completion/src/completions/dot.rs | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'crates/ide_completion') 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; } "#]], ) } + + #[test] + fn completes_after_macro_call_in_submodule() { + check( + r#" +macro_rules! empty { + () => {}; +} + +mod foo { + #[derive(Debug, Default)] + struct Template2 {} + + impl Template2 { + fn private(&self) {} + } + fn baz() { + let goo: Template2 = Template2 {}; + empty!(); + goo.$0 + } +} + "#, + expect![[r#" + me private() -> () + "#]], + ); + } } -- cgit v1.2.3