Skip to content

Commit

Permalink
move slice::swap_unchecked constness to slice_swap_unchecked feature …
Browse files Browse the repository at this point in the history
…gate
  • Loading branch information
RalfJung authored and gitbot committed Feb 20, 2025
1 parent defad3f commit 74a5eef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/slice/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,7 @@ impl<T> [T] {
/// [`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,
Expand Down

0 comments on commit 74a5eef

Please sign in to comment.