aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_completion
diff options
context:
space:
mode:
authorLukas Wirth <[email protected]>2021-06-14 17:17:21 +0100
committerLukas Wirth <[email protected]>2021-06-14 17:17:21 +0100
commit5558e11282c7d71d66b7851ecf9eb8cfb3c67a78 (patch)
tree54661bbffe742ea4c60fa3b3e1d11624f68cdb9a /crates/ide_completion
parent388a91c8a8d542f7a8e0ddff879cce4d4c2b20ae (diff)
Add assoc type in trait bound completion test
Diffstat (limited to 'crates/ide_completion')
-rw-r--r--crates/ide_completion/src/completions/unqualified_path.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/crates/ide_completion/src/completions/unqualified_path.rs b/crates/ide_completion/src/completions/unqualified_path.rs
index 952f052a1..f86b2d3f3 100644
--- a/crates/ide_completion/src/completions/unqualified_path.rs
+++ b/crates/ide_completion/src/completions/unqualified_path.rs
@@ -809,4 +809,22 @@ fn foo(_: impl Foo<B$0>) {}
809 "#]], 809 "#]],
810 ); 810 );
811 } 811 }
812
813 #[test]
814 fn completes_assoc_types_in_trait_bound() {
815 check(
816 r#"
817trait Foo {
818 type Bar;
819}
820
821fn foo<T: Foo<B$0>>(_: T) {}
822"#,
823 expect![[r#"
824 ta Bar = type Bar;
825 tp T
826 tt Foo
827 "#]],
828 );
829 }
812} 830}