From 5558e11282c7d71d66b7851ecf9eb8cfb3c67a78 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Mon, 14 Jun 2021 18:17:21 +0200 Subject: Add assoc type in trait bound completion test --- .../ide_completion/src/completions/unqualified_path.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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) {} "#]], ); } + + #[test] + fn completes_assoc_types_in_trait_bound() { + check( + r#" +trait Foo { + type Bar; +} + +fn foo>(_: T) {} +"#, + expect![[r#" + ta Bar = type Bar; + tp T + tt Foo + "#]], + ); + } } -- cgit v1.2.3