mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +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…
Add table
Add a link
Reference in a new issue