From: Yap Zhi Heng <[email protected]>

gcc/rust/ChangeLog:

        * util/rust-lang-item.h (LangItem::Kind): Add lang item declarations 
for missing
        lang items required for core 1.49 compilation.
        * util/rust-lang-item.cc (LangItem::lang_items): Ditto.

Signed-off-by: Yap Zhi Heng <[email protected]>
---
This change was merged into the gccrs repository and is posted here for
upstream visibility and potential drive-by review, as requested by GCC
release managers.
Each commit email contains a link to its details on github from where you can
find the Pull-Request and associated discussions.


Commit on github: 
https://github.com/Rust-GCC/gccrs/commit/eeec65b7b0154ac5f3337857aca391e3b2a66339

The commit has NOT been mentioned in any issue.

The commit has been mentioned in the following pull-request(s):
 - https://github.com/Rust-GCC/gccrs/pull/4792

 gcc/rust/util/rust-lang-item.cc | 10 ++++++++++
 gcc/rust/util/rust-lang-item.h  | 10 ++++++++++
 2 files changed, 20 insertions(+)

diff --git a/gcc/rust/util/rust-lang-item.cc b/gcc/rust/util/rust-lang-item.cc
index 00dc02b3c..32c191220 100644
--- a/gcc/rust/util/rust-lang-item.cc
+++ b/gcc/rust/util/rust-lang-item.cc
@@ -149,6 +149,16 @@ const BiMap<std::string, LangItem::Kind> 
Rust::LangItem::lang_items = {{
   {"va_list", Kind::VA_LIST},
   {"pin", Kind::PIN},
   {"unpin", Kind::UNPIN},
+
+  {"panic", Kind::PANIC},
+  {"panic_info", Kind::PANIC_INFO},
+  {"panic_location", Kind::PANIC_LOCATION},
+  {"panic_bounds_check", Kind::PANIC_BOUNDS_CHECK},
+  {"panic_str", Kind::PANIC_STR},
+  {"align_offset", Kind::ALIGN_OFFSET},
+  {"new_unchecked", Kind::NEW_UNCHECKED},
+  {"from_generator", Kind::FROM_GENERATOR},
+  {"get_context", Kind::GET_CONTEXT},
 }};
 
 tl::optional<LangItem::Kind>
diff --git a/gcc/rust/util/rust-lang-item.h b/gcc/rust/util/rust-lang-item.h
index 61b4f64da..0e81dc9bc 100644
--- a/gcc/rust/util/rust-lang-item.h
+++ b/gcc/rust/util/rust-lang-item.h
@@ -187,6 +187,16 @@ public:
     VA_LIST,
     PIN,
     UNPIN,
+
+    PANIC,
+    PANIC_INFO,
+    PANIC_LOCATION,
+    PANIC_BOUNDS_CHECK,
+    PANIC_STR,
+    ALIGN_OFFSET,
+    NEW_UNCHECKED,
+    FROM_GENERATOR,
+    GET_CONTEXT,
   };
 
   static const BiMap<std::string, Kind> lang_items;

base-commit: feda3205877737991bb52d7c9b781fe83de06900
-- 
2.54.0

Reply via email to