https://gcc.gnu.org/g:e8d3ccf05dce82d682649865a8e5fc61b92fc2d4

commit e8d3ccf05dce82d682649865a8e5fc61b92fc2d4
Author: Arthur Cohen <arthur.co...@embecosm.com>
Date:   Thu Dec 26 23:01:32 2024 +0000

    derive(Clone): Use lang item for PhantomData in Clone
    
    gcc/rust/ChangeLog:
    
            * expand/rust-derive-clone.cc (DeriveClone::visit_union): Create a 
lang item path
            instead of a regular path.

Diff:
---
 gcc/rust/expand/rust-derive-clone.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/rust/expand/rust-derive-clone.cc 
b/gcc/rust/expand/rust-derive-clone.cc
index eeffb009b953..aefc64cf97e9 100644
--- a/gcc/rust/expand/rust-derive-clone.cc
+++ b/gcc/rust/expand/rust-derive-clone.cc
@@ -263,7 +263,7 @@ DeriveClone::visit_union (Union &item)
     {StructField (
       Identifier ("_t"),
       builder.single_generic_type_path (
-       "PhantomData",
+       LangItem::Kind::PHANTOM_DATA,
        GenericArgs (
          {}, {GenericArg::create_type (builder.single_type_path ("T"))}, {})),
       Visibility::create_private (), item.get_locus ())});

Reply via email to