add regression tests for add_missing_impl_members

This commit is contained in:
Hegui Dai
2025-11-24 22:35:48 +08:00
parent 35ab21b294
commit d73c941d8c
@@ -2500,6 +2500,40 @@ fn foo(&self, my_macro: usize) {
${0:todo!()}
}
}
"#,
);
}
#[test]
fn regression_test_for_when_impl_for_unit() {
check_assist(
add_missing_impl_members,
r#"
trait Test {
fn f<B>()
where
B: IntoIterator,
<B as IntoIterator>::Item: Copy;
}
impl Test for () {
$0
}
"#,
r#"
trait Test {
fn f<B>()
where
B: IntoIterator,
<B as IntoIterator>::Item: Copy;
}
impl Test for () {
fn f<B>()
where
B: IntoIterator,
<B as IntoIterator>::Item: Copy {
${0:todo!()}
}
}
"#,
);
}