Skip to content

Commit e5281ee

Browse files
bors[bot]philberty
andauthored
Merge #1100
1100: Add known lang item const_slice_ptr mappings r=philberty a=philberty This will allow us to define the const_slice_ptr lang item attribute without erroring out as an unknown lang item. Addresses #849 Co-authored-by: Philip Herron <[email protected]>
2 parents e43a5c5 + 595eb9c commit e5281ee

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

gcc/rust/util/rust-lang-item.h

+7
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ class RustLangItem
7070

7171
// https://github.com/rust-lang/rust/blob/master/library/core/src/ptr/const_ptr.rs
7272
CONST_PTR,
73+
CONST_SLICE_PTR,
7374

7475
UNKNOWN,
7576
};
@@ -208,6 +209,10 @@ class RustLangItem
208209
{
209210
return ItemType::CONST_PTR;
210211
}
212+
else if (item.compare ("const_slice_ptr") == 0)
213+
{
214+
return ItemType::CONST_SLICE_PTR;
215+
}
211216

212217
return ItemType::UNKNOWN;
213218
}
@@ -282,6 +287,8 @@ class RustLangItem
282287
return "RangeToInclusive";
283288
case CONST_PTR:
284289
return "const_ptr";
290+
case CONST_SLICE_PTR:
291+
return "const_slice_ptr";
285292

286293
case UNKNOWN:
287294
return "<UNKNOWN>";

0 commit comments

Comments
 (0)