[COMMITTED,19/19] gccrs: lang-items: Add ManuallyDrop<T>

Message ID 20250414163138.506753-20-arthur.cohen@embecosm.com
State Committed
Commit 901d94e8b4eb9a273e9e75d5586cb5abde73a7a6
Headers
Series [COMMITTED,01/19] rust: Use FLOAT_TYPE_P instead of manual checking |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_simplebootstrap_build--master-arm-bootstrap fail Patch failed to apply
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 fail Patch failed to apply
linaro-tcwg-bot/tcwg_simplebootstrap_build--master-aarch64-bootstrap fail Patch failed to apply

Commit Message

Arthur Cohen April 14, 2025, 4:31 p.m. UTC
  From: Arthur Cohen <arthur.cohen@embecosm.com>

gcc/rust/ChangeLog:

	* util/rust-lang-item.h: Add new manually_drop lang item.
	* util/rust-lang-item.cc: Likewise.
---
 gcc/rust/util/rust-lang-item.cc | 1 +
 gcc/rust/util/rust-lang-item.h  | 2 ++
 2 files changed, 3 insertions(+)
  

Patch

diff --git a/gcc/rust/util/rust-lang-item.cc b/gcc/rust/util/rust-lang-item.cc
index a76cc7ff651..9aff31b657c 100644
--- a/gcc/rust/util/rust-lang-item.cc
+++ b/gcc/rust/util/rust-lang-item.cc
@@ -118,6 +118,7 @@  const BiMap<std::string, LangItem::Kind> Rust::LangItem::lang_items = {{
 
   {"discriminant_kind", Kind::DISCRIMINANT_KIND},
   {"discriminant_type", Kind::DISCRIMINANT_TYPE},
+  {"manually_drop", Kind::MANUALLY_DROP},
 }};
 
 tl::optional<LangItem::Kind>
diff --git a/gcc/rust/util/rust-lang-item.h b/gcc/rust/util/rust-lang-item.h
index 8f3af3615bb..67a5d9c438f 100644
--- a/gcc/rust/util/rust-lang-item.h
+++ b/gcc/rust/util/rust-lang-item.h
@@ -150,6 +150,8 @@  public:
 
     DISCRIMINANT_TYPE,
     DISCRIMINANT_KIND,
+
+    MANUALLY_DROP,
   };
 
   static const BiMap<std::string, Kind> lang_items;