7
Extend the const swap feature by est31 · Pull Request #90644 · rust-lang/rust ·...
source link: https://github.com/rust-lang/rust/pull/90644
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Adds the const_swap
feature gate to three more swap functions. cc tracking issue #83163
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); }
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK