mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
move slice::swap_unchecked constness to slice_swap_unchecked feature gate
This commit is contained in:
@@ -959,7 +959,7 @@ pub const fn swap(&mut self, a: usize, b: usize) {
|
||||
/// [`swap`]: slice::swap
|
||||
/// [undefined behavior]: https://doc.rust-lang.org/reference/behavior-considered-undefined.html
|
||||
#[unstable(feature = "slice_swap_unchecked", issue = "88539")]
|
||||
#[rustc_const_unstable(feature = "const_swap", issue = "83163")]
|
||||
#[rustc_const_unstable(feature = "slice_swap_unchecked", issue = "88539")]
|
||||
pub const unsafe fn swap_unchecked(&mut self, a: usize, b: usize) {
|
||||
assert_unsafe_precondition!(
|
||||
check_library_ub,
|
||||
|
||||
Reference in New Issue
Block a user