Merge pull request #3370 from rtfeldman/list-unreachable

List unreachable
This commit is contained in:
Richard Feldman 2022-07-06 10:45:50 -04:00 committed by GitHub
commit 7365da6f69
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 41 additions and 10 deletions

View file

@ -884,6 +884,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 | StrToScalars | StrCountGraphemes | StrCountUtf8Bytes => {
arena.alloc_slice_copy(&[borrowed])
}