diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-02-23 17:06:57 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-02-23 17:06:57 +0000 |
commit | 0d5a9e4104a88df341480aa05d1c8976996e6e13 (patch) | |
tree | 55290349625c8516fbb8fd24f7fa22582a57d35a /crates/ide_completion/src/completions | |
parent | e837fb245aadf2dcfda51a17a6c19b5efd47dc42 (diff) | |
parent | 338823f73aefbf7957b928ad76fc5f55cc43df9c (diff) |
Merge #7768
7768: Fix visibility computation when inside a block expression r=jonas-schievink a=jonas-schievink
fixes https://github.com/rust-analyzer/rust-analyzer/issues/7728
bors r+
Co-authored-by: Jonas Schievink <[email protected]>
Diffstat (limited to 'crates/ide_completion/src/completions')
-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 | } |