Unnamed repository; edit this file 'description' to name the repository.
Add generic bounds in test
TheDoctor314 2021-11-11
parent 05b368f · commit e0e8d87
-rw-r--r--crates/ide_assists/src/handlers/replace_derive_with_manual_impl.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ide_assists/src/handlers/replace_derive_with_manual_impl.rs b/crates/ide_assists/src/handlers/replace_derive_with_manual_impl.rs
index 7aeaedf5f0..1f28ecc755 100644
--- a/crates/ide_assists/src/handlers/replace_derive_with_manual_impl.rs
+++ b/crates/ide_assists/src/handlers/replace_derive_with_manual_impl.rs
@@ -1079,18 +1079,18 @@ impl<T, U> Default for Foo<T, U> {
}
#[test]
- fn add_custom_impl_clone_generic_tuple_struct() {
+ fn add_custom_impl_clone_generic_tuple_struct_with_bounds() {
check_assist(
replace_derive_with_manual_impl,
r#"
//- minicore: clone
#[derive(Clo$0ne)]
-struct Foo<T>(T, usize);
+struct Foo<T: Clone>(T, usize);
"#,
r#"
-struct Foo<T>(T, usize);
+struct Foo<T: Clone>(T, usize);
-impl<T> Clone for Foo<T> {
+impl<T: Clone> Clone for Foo<T> {
$0fn clone(&self) -> Self {
Self(self.0.clone(), self.1.clone())
}