mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-15 09:27:27 +00:00
Add test
This commit is contained in:
parent
27ed1ebf89
commit
cf456d72db
1 changed files with 28 additions and 0 deletions
|
@ -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() -> ()
|
||||
"#]],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue