From 69b78edb5e2a40d8665db713d363bd16c835d6cf Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Sat, 12 Dec 2020 18:18:19 +0100 Subject: Don't HirDisplay unknown types when displaying for source --- .../src/handlers/add_missing_impl_members.rs | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'crates/assists') diff --git a/crates/assists/src/handlers/add_missing_impl_members.rs b/crates/assists/src/handlers/add_missing_impl_members.rs index bbb71e261..e413505d3 100644 --- a/crates/assists/src/handlers/add_missing_impl_members.rs +++ b/crates/assists/src/handlers/add_missing_impl_members.rs @@ -781,6 +781,31 @@ impl Test for () { ${0:todo!()} } } +"#, + ) + } + + #[test] + fn missing_generic_type() { + check_assist( + add_missing_impl_members, + r#" +trait Foo { + fn foo(&self, bar: BAR); +} +impl Foo for () { + <|> +} +"#, + r#" +trait Foo { + fn foo(&self, bar: BAR); +} +impl Foo for () { + fn foo(&self, bar: BAR) { + ${0:todo!()} + } +} "#, ) } -- cgit v1.2.3