aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/completion/presentation.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide/src/completion/presentation.rs')
-rw-r--r--crates/ra_ide/src/completion/presentation.rs51
1 files changed, 51 insertions, 0 deletions
diff --git a/crates/ra_ide/src/completion/presentation.rs b/crates/ra_ide/src/completion/presentation.rs
index 946bbef7c..bfa7e08be 100644
--- a/crates/ra_ide/src/completion/presentation.rs
+++ b/crates/ra_ide/src/completion/presentation.rs
@@ -683,6 +683,57 @@ impl S {
683 }, 683 },
684 ] 684 ]
685 "#]], 685 "#]],
686 );
687
688 check(
689 r#"
690use self::my<|>;
691
692/// mod docs
693mod my { }
694
695/// enum docs
696enum E {
697 /// variant docs
698 V
699}
700use self::E::*;
701"#,
702 expect![[r#"
703 [
704 CompletionItem {
705 label: "E",
706 source_range: 10..12,
707 delete: 10..12,
708 insert: "E",
709 kind: Enum,
710 documentation: Documentation(
711 "enum docs",
712 ),
713 },
714 CompletionItem {
715 label: "V",
716 source_range: 10..12,
717 delete: 10..12,
718 insert: "V",
719 kind: EnumVariant,
720 detail: "()",
721 documentation: Documentation(
722 "variant docs",
723 ),
724 },
725 CompletionItem {
726 label: "my",
727 source_range: 10..12,
728 delete: 10..12,
729 insert: "my",
730 kind: Module,
731 documentation: Documentation(
732 "mod docs",
733 ),
734 },
735 ]
736 "#]],
686 ) 737 )
687 } 738 }
688 739