]> git.lizzy.rs Git - rust.git/commitdiff
Add generic bounds in test
authorTheDoctor314 <64731940+TheDoctor314@users.noreply.github.com>
Thu, 11 Nov 2021 08:46:29 +0000 (14:16 +0530)
committerTheDoctor314 <64731940+TheDoctor314@users.noreply.github.com>
Thu, 11 Nov 2021 08:46:29 +0000 (14:16 +0530)
crates/ide_assists/src/handlers/replace_derive_with_manual_impl.rs

index 7aeaedf5f05a47af89a39ac40db8e446dbd31604..1f28ecc755f9a28233c05cf59b800278378de2d9 100644 (file)
@@ -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())
     }