Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions gcc/rust/util/rust-lang-item.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};

Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -273,6 +280,8 @@ class RustLangItem
return "RangeInclusive";
case RANGE_TO_INCLUSIVE:
return "RangeToInclusive";
case CONST_PTR:
return "const_ptr";

case UNKNOWN:
return "<UNKNOWN>";
Expand Down