mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-30 13:06:28 +03:00
add regression tests for add_missing_impl_members
This commit is contained in:
@@ -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!()}
|
||||
}
|
||||
}
|
||||
"#,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user