aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/util/rust-lang-item.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/util/rust-lang-item.h')
-rw-r--r--gcc/rust/util/rust-lang-item.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/rust/util/rust-lang-item.h b/gcc/rust/util/rust-lang-item.h
index da200e7..cade09d 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,18 @@ 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;
+ }
else if (item.compare ("Range") == 0)
{
return ItemType::RANGE;
@@ -241,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: