https://gcc.gnu.org/g:31bdbddf39bebc3381db10addb60c709abf81f5d
commit r17-4127-g31bdbddf39bebc3381db10addb60c709abf81f5d Author: Yap Zhi Heng <[email protected]> Date: Mon Aug 17 20:51:33 2026 +0800 gccrs: Add missing lang item declarations for core 1.49 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]> Diff: --- 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 00dc02b3c301..32c191220038 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 61b4f64da251..0e81dc9bc056 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;
