]> git.lizzy.rs Git - rust.git/commit - src/tools/rust-analyzer
Rollup merge of #90644 - est31:const_swap, r=Mark-Simulacrum
authorMatthias Krüger <matthias.krueger@famsik.de>
Fri, 12 Nov 2021 18:17:30 +0000 (19:17 +0100)
committerGitHub <noreply@github.com>
Fri, 12 Nov 2021 18:17:30 +0000 (19:17 +0100)
commit70532c4503c91d308bf0a1b1b2e1a3e2f5635ced
treea4159487415698622b734751d6e90ca40aabdc40
parent1fe15be34c472c32a8cd6f1d789592f096d2f50b
parenteeaa2f16aa4487d3e5fdaef7097b488d45b986d2
Rollup merge of #90644 - est31:const_swap, r=Mark-Simulacrum

Extend the const swap feature

Adds the `const_swap` feature gate to three more swap functions. cc tracking issue #83163

```Rust
impl<T> [T] {
    pub const fn swap(&mut self, a: usize, b: usize);
    pub const unsafe fn swap_unchecked(&mut self, a: usize, b: usize);
}
impl<T: ?Sized> *mut T {
    pub const unsafe fn swap(self, with: *mut T);
}