diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-07-03 10:49:12 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-07-03 10:49:12 +0100 |
commit | 81bb3d9c1a1cfd1e94a3c43013eb7f63cf54f8c7 (patch) | |
tree | 8bdde6b7793c9aa077fd06ba64bb262a77235fc8 /crates/ra_ide/src/completion/presentation.rs | |
parent | 4cb8bf03c588dcf244d25785de3878b6ef3f7958 (diff) | |
parent | 0e23175a077de5183a34696490848b47e4198f56 (diff) |
Merge #5199
5199: Cleanup record completion tests r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide/src/completion/presentation.rs')
-rw-r--r-- | crates/ra_ide/src/completion/presentation.rs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/crates/ra_ide/src/completion/presentation.rs b/crates/ra_ide/src/completion/presentation.rs index b18279746..bd274bd74 100644 --- a/crates/ra_ide/src/completion/presentation.rs +++ b/crates/ra_ide/src/completion/presentation.rs | |||
@@ -606,6 +606,31 @@ mod tests { | |||
606 | ] | 606 | ] |
607 | "### | 607 | "### |
608 | ); | 608 | ); |
609 | |||
610 | assert_debug_snapshot!(do_reference_completion( | ||
611 | r#" | ||
612 | struct A { | ||
613 | #[deprecated] | ||
614 | the_field: u32, | ||
615 | } | ||
616 | fn foo() { | ||
617 | A { the<|> } | ||
618 | } | ||
619 | "#, | ||
620 | ), | ||
621 | @r###" | ||
622 | [ | ||
623 | CompletionItem { | ||
624 | label: "the_field", | ||
625 | source_range: 69..72, | ||
626 | delete: 69..72, | ||
627 | insert: "the_field", | ||
628 | kind: Field, | ||
629 | detail: "u32", | ||
630 | deprecated: true, | ||
631 | }, | ||
632 | ] | ||
633 | "###); | ||
609 | } | 634 | } |
610 | 635 | ||
611 | #[test] | 636 | #[test] |