]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: lang-items: Mark Clone trait as a lang item in testsuite
authorArthur Cohen <arthur.cohen@embecosm.com>
Fri, 3 Jan 2025 15:46:33 +0000 (15:46 +0000)
committerArthur Cohen <arthur.cohen@embecosm.com>
Fri, 21 Mar 2025 11:57:50 +0000 (12:57 +0100)
gcc/testsuite/ChangeLog:

* rust/compile/derive_macro1.rs: Add #[lang = "clone"] to Clone trait.
* rust/compile/derive_macro3.rs: Likewise.
* rust/compile/derive_macro6.rs: Likewise.
* rust/execute/torture/derive_macro3.rs: Likewise.

gcc/testsuite/rust/compile/derive_macro1.rs
gcc/testsuite/rust/compile/derive_macro3.rs
gcc/testsuite/rust/compile/derive_macro6.rs
gcc/testsuite/rust/execute/torture/derive_macro3.rs

index 779aad78e11d905c91458a3181ff23ab6d87a4a2..bc10d601bb8d2efb18a3c588dabc20c72f99f61a 100644 (file)
@@ -1,6 +1,7 @@
 #[lang = "sized"]
 pub trait Sized {}
 
+#[lang = "clone"]
 pub trait Clone {
     fn clone(&self) -> Self;
 }
index 1c7d4737bfe98be687faecfc61385bd2b86c07c0..ad40cae94b51decc52ea2e40a7fb284cfa68bcf6 100644 (file)
@@ -1,6 +1,7 @@
 #[lang = "sized"]
 pub trait Sized {}
 
+#[lang = "clone"]
 pub trait Clone {
     fn clone(&self) -> Self;
 }
index b7bf7a78acd1b3eb901af861e4021d12e816f12f..35327c03b54c36698a68b97cf87c638d169d2fd8 100644 (file)
@@ -2,6 +2,9 @@
 pub trait Sized {}
 
 pub trait Copy {}
+
+
+#[lang = "clone"]
 pub trait Clone {
     fn clone(&self) -> Self;
 }
@@ -9,10 +12,6 @@ pub trait Clone {
 #[lang = "phantom_data"]
 pub struct PhantomData<T>;
 
-pub struct AssertParamIsCopy<T: Copy> {
-    pub _field: PhantomData<T>,
-}
-
 impl Copy for i32 {}
 impl Copy for i64 {}
 impl Copy for U {}
index 7b3a089d7514ee3727f9b8a300bbcaa8831ac7c2..4138a5bf7e4c491c17277a09026c72fe6974d56d 100644 (file)
@@ -1,6 +1,7 @@
 #[lang = "sized"]
 pub trait Sized {}
 
+#[lang = "clone"]
 pub trait Clone {
     fn clone(&self) -> Self;
 }