diff options
author | Lukas Wirth <[email protected]> | 2021-06-14 17:17:21 +0100 |
---|---|---|
committer | Lukas Wirth <[email protected]> | 2021-06-14 17:17:21 +0100 |
commit | 5558e11282c7d71d66b7851ecf9eb8cfb3c67a78 (patch) | |
tree | 54661bbffe742ea4c60fa3b3e1d11624f68cdb9a /crates/ide_completion | |
parent | 388a91c8a8d542f7a8e0ddff879cce4d4c2b20ae (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.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 | } |