aboutsummaryrefslogtreecommitdiff
path: root/crates/assists
diff options
context:
space:
mode:
authorLukas Wirth <[email protected]>2020-12-12 17:18:19 +0000
committerLukas Wirth <[email protected]>2020-12-12 18:05:00 +0000
commit69b78edb5e2a40d8665db713d363bd16c835d6cf (patch)
tree32b0fc4b548d1a3d3057e7dfbaea10a977f7b0cc /crates/assists
parent91bf15a2f53629209bd13d2e46121b9be8af1f94 (diff)
Don't HirDisplay unknown types when displaying for source
Diffstat (limited to 'crates/assists')
-rw-r--r--crates/assists/src/handlers/add_missing_impl_members.rs25
1 files changed, 25 insertions, 0 deletions
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
@@ -784,4 +784,29 @@ impl Test for () {
784"#, 784"#,
785 ) 785 )
786 } 786 }
787
788 #[test]
789 fn missing_generic_type() {
790 check_assist(
791 add_missing_impl_members,
792 r#"
793trait Foo<BAR> {
794 fn foo(&self, bar: BAR);
795}
796impl Foo for () {
797 <|>
798}
799"#,
800 r#"
801trait Foo<BAR> {
802 fn foo(&self, bar: BAR);
803}
804impl Foo for () {
805 fn foo(&self, bar: BAR) {
806 ${0:todo!()}
807 }
808}
809"#,
810 )
811 }
787} 812}