Add const_ptr lang item mappings
const_ptr is a lang item used as part of the slice implemenation this adds it to our mappings so we do not error with an unknown lang item.
This commit is contained in:
parent
77a4950744
commit
a1b065050b
|
@ -68,6 +68,9 @@ public:
|
|||
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 @@ public:
|
|||
{
|
||||
return ItemType::RANGE_TO_INCLUSIVE;
|
||||
}
|
||||
else if (item.compare ("const_ptr") == 0)
|
||||
{
|
||||
return ItemType::CONST_PTR;
|
||||
}
|
||||
|
||||
return ItemType::UNKNOWN;
|
||||
}
|
||||
|
@ -273,6 +280,8 @@ public:
|
|||
return "RangeInclusive";
|
||||
case RANGE_TO_INCLUSIVE:
|
||||
return "RangeToInclusive";
|
||||
case CONST_PTR:
|
||||
return "const_ptr";
|
||||
|
||||
case UNKNOWN:
|
||||
return "<UNKNOWN>";
|
||||
|
|
Loading…
Reference in New Issue