List.unreachable

This commit is contained in:
Folkert 2022-07-02 19:31:35 +02:00
parent 543615292a
commit 506e374642
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
7 changed files with 36 additions and 0 deletions

View file

@ -890,6 +890,7 @@ pub fn lowlevel_borrow_signature(arena: &Bump, op: LowLevel) -> &[bool] {
// - arguments that we may want to update destructively must be Owned
// - other refcounted arguments are Borrowed
match op {
Unreachable => arena.alloc_slice_copy(&[irrelevant]),
ListLen | StrIsEmpty | StrCountGraphemes => arena.alloc_slice_copy(&[borrowed]),
ListWithCapacity => arena.alloc_slice_copy(&[irrelevant]),
ListReplaceUnsafe => arena.alloc_slice_copy(&[owned, irrelevant, irrelevant]),