aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_completion
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-06-14 17:17:55 +0100
committerGitHub <[email protected]>2021-06-14 17:17:55 +0100
commit401d79ac0674ec62689949c3a531836420cb9beb (patch)
treeaf12ccc6df5224ca0c5eecda9f0523d344903001 /crates/ide_completion
parentdb910e1573cb88cce9c9bc4ca7e701468b17b82d (diff)
parent5558e11282c7d71d66b7851ecf9eb8cfb3c67a78 (diff)
Merge #9270
9270: minor: Add assoc type in trait bound completion test r=Veykril a=Veykril bors r+ Co-authored-by: Lukas Wirth <[email protected]>
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}