diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-06-14 17:17:55 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-06-14 17:17:55 +0100 |
commit | 401d79ac0674ec62689949c3a531836420cb9beb (patch) | |
tree | af12ccc6df5224ca0c5eecda9f0523d344903001 /crates/ide_completion | |
parent | db910e1573cb88cce9c9bc4ca7e701468b17b82d (diff) | |
parent | 5558e11282c7d71d66b7851ecf9eb8cfb3c67a78 (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.rs | 18 |
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#" | ||
817 | trait Foo { | ||
818 | type Bar; | ||
819 | } | ||
820 | |||
821 | fn 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 | } |