public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] Add index and index_mut lang item mappings
@ 2022-06-08 12:12 Thomas Schwinge
0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2022-06-08 12:12 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:2975f114360d92588864a11fb896eed3bb4a0dcf
commit 2975f114360d92588864a11fb896eed3bb4a0dcf
Author: Philip Herron <philip.herron@embecosm.com>
Date: Thu Feb 24 14:54:34 2022 +0000
Add index and index_mut lang item mappings
Diff:
---
gcc/rust/util/rust-lang-item.h | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/gcc/rust/util/rust-lang-item.h b/gcc/rust/util/rust-lang-item.h
index 40187ab42f1..cade09d8854 100644
--- a/gcc/rust/util/rust-lang-item.h
+++ b/gcc/rust/util/rust-lang-item.h
@@ -56,6 +56,10 @@ public:
DEREF,
DEREF_MUT,
+ // https://github.com/rust-lang/rust/blob/master/library/core/src/ops/index.rs
+ INDEX,
+ INDEX_MUT,
+
// https://github.com/rust-lang/rust/blob/master/library/core/src/ops/range.rs
RANGE_FULL,
RANGE,
@@ -165,6 +169,14 @@ public:
{
return ItemType::DEREF_MUT;
}
+ else if (item.compare ("index") == 0)
+ {
+ return ItemType::INDEX;
+ }
+ else if (item.compare ("index_mut") == 0)
+ {
+ return ItemType::INDEX_MUT;
+ }
else if (item.compare ("RangeFull") == 0)
{
return ItemType::RANGE_FULL;
@@ -245,6 +257,10 @@ public:
return "deref";
case DEREF_MUT:
return "deref_mut";
+ case INDEX:
+ return "index";
+ case INDEX_MUT:
+ return "index_mut";
case RANGE_FULL:
return "RangeFull";
case RANGE:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-06-08 12:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-08 12:12 [gcc/devel/rust/master] Add index and index_mut lang item mappings Thomas Schwinge
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).