Skip to content

Commit cf456d7

Browse files
Add test
1 parent 27ed1eb commit cf456d7

File tree

1 file changed

+28
-0
lines changed
  • crates/ide_completion/src/completions

1 file changed

+28
-0
lines changed

crates/ide_completion/src/completions/dot.rs

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,4 +428,32 @@ fn main() { make_s!().f$0; }
428428
"#]],
429429
)
430430
}
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+
}
431459
}

0 commit comments

Comments
 (0)