[gcc/devel/rust/master] derive(Clone): Mark PhantomData as a lang item
Thomas Schwinge
tschwinge@gcc.gnu.org
Wed Mar 26 14:06:00 GMT 2025
https://gcc.gnu.org/g:533abf7e53c6edb699d67418a84b662bd41cf381
commit 533abf7e53c6edb699d67418a84b662bd41cf381
Author: Arthur Cohen <arthur.cohen@embecosm.com>
Date: Thu Dec 26 10:57:07 2024 +0000
derive(Clone): Mark PhantomData as a lang item
gcc/testsuite/ChangeLog:
* rust/compile/derive_macro4.rs: Make PhantomData a lang item.
Diff:
---
gcc/testsuite/rust/compile/derive_macro4.rs | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/gcc/testsuite/rust/compile/derive_macro4.rs b/gcc/testsuite/rust/compile/derive_macro4.rs
index 7802e8fd8000..b20043ba927b 100644
--- a/gcc/testsuite/rust/compile/derive_macro4.rs
+++ b/gcc/testsuite/rust/compile/derive_macro4.rs
@@ -6,12 +6,9 @@ pub trait Clone {
fn clone(&self) -> Self;
}
+#[lang = "phantom_data"]
struct PhantomData<T>;
-pub struct AssertParamIsCopy<T: Copy> {
- _field: PhantomData<T>,
-}
-
#[derive(Clone)] // { dg-error "bounds not satisfied for U .Copy. is not satisfied" }
union U {
i: i32,
More information about the Gcc-cvs
mailing list