Remove Str.fromUtf8Range

Seamless slices make this obsolete!
This commit is contained in:
Richard Feldman 2024-02-16 20:00:07 -05:00
parent 74e58d3d51
commit 37b154df4f
No known key found for this signature in database
GPG key ID: F1F21AA5B1D9E43B
15 changed files with 94 additions and 219 deletions

View file

@ -1596,7 +1596,7 @@ fn low_level_no_rc(lowlevel: &LowLevel) -> RC {
I128OfDec => RC::NoRc,
DictPseudoSeed => RC::NoRc,
StrStartsWith | StrEndsWith => RC::NoRc,
StrFromUtf8Range => RC::Rc,
StrFromUtf8 => RC::Rc,
StrToUtf8 => RC::Rc,
StrRepeat => RC::NoRc,
StrFromInt | StrFromFloat => RC::NoRc,

View file

@ -1350,7 +1350,7 @@ fn lowlevel_borrow_signature(arena: &Bump, op: LowLevel) -> &[Ownership] {
| NumCountOneBits
| I128OfDec => arena.alloc_slice_copy(&[irrelevant]),
StrStartsWith | StrEndsWith => arena.alloc_slice_copy(&[borrowed, borrowed]),
StrFromUtf8Range => arena.alloc_slice_copy(&[owned, irrelevant, irrelevant]),
StrFromUtf8 => arena.alloc_slice_copy(&[owned]),
StrToUtf8 => arena.alloc_slice_copy(&[owned]),
StrRepeat => arena.alloc_slice_copy(&[borrowed, irrelevant]),
StrFromInt | StrFromFloat => arena.alloc_slice_copy(&[irrelevant]),