Added test for impl member assist when impl def is missing braces

This commit is contained in:
Matt Hooper 2020-09-21 00:43:03 +01:00
parent 9724af038b
commit 532be0e780

View file

@ -313,6 +313,25 @@ impl Foo for S {
);
}
#[test]
fn test_impl_def_without_braces() {
check_assist(
add_missing_impl_members,
r#"
trait Foo { fn foo(&self); }
struct S;
impl Foo for S<|>"#,
r#"
trait Foo { fn foo(&self); }
struct S;
impl Foo for S {
fn foo(&self) {
${0:todo!()}
}
}"#,
);
}
#[test]
fn fill_in_type_params_1() {
check_assist(