about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src/coverage/counters.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-10-05 13:15:56 +0200
committerGitHub <noreply@github.com>2024-10-05 13:15:56 +0200
commit386a0baecbcaf3d812c6cb7f2da4cb754379b19f (patch)
tree2f49fe8d5c9f6a15b0c0414038dfe1653f751e36 /compiler/rustc_mir_transform/src/coverage/counters.rs
parent5a4ee43c387110736440cecc375cb5aedc441dbc (diff)
parentd0e67586774530fa8fd70e563768067c0b2ca99d (diff)
downloadrust-386a0baecbcaf3d812c6cb7f2da4cb754379b19f.tar.gz
rust-386a0baecbcaf3d812c6cb7f2da4cb754379b19f.zip
Rollup merge of #130428 - ink-feather-org:stabilize-const-split-at-mut, r=RalfJung
Stabilize `const_slice_split_at_mut` and `const_slice_first_last_chunk`

Stabilizes #101804 and the remainder of #111774.

FCP proposed in the tracking issue.

Requires #130403 (or it would need a rustc_allow_const_fn_unstable for it)

Stabilized const API:
```rust
// slice
impl [T] {
    pub const fn split_at_mut(&mut self, mid: usize) -> (&mut [T], &mut [T]);
    pub const fn split_at_mut_unchecked(&mut self, mid: usize) -> (&mut [T], &mut [T]);
    pub const fn split_at_mut_checked(&mut self, mid: usize) -> Option<(&mut [T], &mut [T])>;

    pub const fn first_chunk_mut<const N: usize>(&mut self) -> Option<&mut [T; N]>;
    pub const fn last_chunk_mut<const N: usize>(&mut self) -> Option<&mut [T; N]>;
    pub const fn split_first_chunk_mut<const N: usize>(&mut self) -> Option<(&mut [T; N], &mut [T])>;
    pub const fn split_last_chunk_mut<const N: usize>(&mut self) -> Option<(&mut [T; N], &mut [T])>;
}
```

Closes #101804
Closes #111774

cc `@RalfJung`
Diffstat (limited to 'compiler/rustc_mir_transform/src/coverage/counters.rs')
0 files changed, 0 insertions, 0 deletions