This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit e193f46
authored
Rollup merge of rust-lang#100076 - tspiteri:const_slice_split_at, r=oli-obk
make slice::{split_at,split_at_unchecked} const functions
Now that `slice::from_raw_parts` is const in stable 1.64, it makes sense to have `split_at` const as well, otherwise unsafe code is required to achieve a const equivalent.2 files changed
+14
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| 152 | + | |
152 | 153 | | |
153 | 154 | | |
154 | 155 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1541 | 1541 | | |
1542 | 1542 | | |
1543 | 1543 | | |
| 1544 | + | |
1544 | 1545 | | |
1545 | 1546 | | |
1546 | 1547 | | |
1547 | | - | |
| 1548 | + | |
1548 | 1549 | | |
1549 | 1550 | | |
1550 | | - | |
| 1551 | + | |
1551 | 1552 | | |
1552 | 1553 | | |
1553 | 1554 | | |
| |||
1626 | 1627 | | |
1627 | 1628 | | |
1628 | 1629 | | |
| 1630 | + | |
1629 | 1631 | | |
1630 | 1632 | | |
1631 | | - | |
| 1633 | + | |
| 1634 | + | |
| 1635 | + | |
| 1636 | + | |
| 1637 | + | |
| 1638 | + | |
| 1639 | + | |
| 1640 | + | |
1632 | 1641 | | |
1633 | | - | |
| 1642 | + | |
1634 | 1643 | | |
1635 | 1644 | | |
1636 | 1645 | | |
| |||
0 commit comments