diff --git a/gcc/rust/util/rust-lang-item.h b/gcc/rust/util/rust-lang-item.h index cade09d88541..d2765bf201ea 100644 --- a/gcc/rust/util/rust-lang-item.h +++ b/gcc/rust/util/rust-lang-item.h @@ -68,6 +68,9 @@ class RustLangItem RANGE_INCLUSIVE, RANGE_TO_INCLUSIVE, + // https://github.com/rust-lang/rust/blob/master/library/core/src/ptr/const_ptr.rs + CONST_PTR, + UNKNOWN, }; @@ -201,6 +204,10 @@ class RustLangItem { return ItemType::RANGE_TO_INCLUSIVE; } + else if (item.compare ("const_ptr") == 0) + { + return ItemType::CONST_PTR; + } return ItemType::UNKNOWN; } @@ -273,6 +280,8 @@ class RustLangItem return "RangeInclusive"; case RANGE_TO_INCLUSIVE: return "RangeToInclusive"; + case CONST_PTR: + return "const_ptr"; case UNKNOWN: return "";