From: Arthur Cohen Date: Thu, 23 Jan 2025 11:46:48 +0000 (+0000) Subject: lang-items: Add From::from X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3c21102b7378b9a4d61c36689063f6104e751ff6;p=thirdparty%2Fgcc.git lang-items: Add From::from gcc/rust/ChangeLog: * util/rust-lang-item.h: Declare it. * util/rust-lang-item.cc: Use it. --- diff --git a/gcc/rust/util/rust-lang-item.cc b/gcc/rust/util/rust-lang-item.cc index 6b8c6e4606b..091c6b67ea5 100644 --- a/gcc/rust/util/rust-lang-item.cc +++ b/gcc/rust/util/rust-lang-item.cc @@ -110,6 +110,8 @@ const BiMap Rust::LangItem::lang_items = {{ {"into_result", Kind::TRY_INTO_RESULT}, {"from_error", Kind::TRY_FROM_ERROR}, {"from_ok", Kind::TRY_FROM_OK}, + + {"from", Kind::FROM_FROM}, }}; tl::optional diff --git a/gcc/rust/util/rust-lang-item.h b/gcc/rust/util/rust-lang-item.h index aa7efb12fca..b5abf615d59 100644 --- a/gcc/rust/util/rust-lang-item.h +++ b/gcc/rust/util/rust-lang-item.h @@ -141,6 +141,9 @@ public: TRY_INTO_RESULT, TRY_FROM_ERROR, TRY_FROM_OK, + + // NOTE: This is not a lang item in later versions of Rust + FROM_FROM, }; static const BiMap lang_items;