Skip to content

Commit

Permalink
Add missing CopyMarker impl
Browse files Browse the repository at this point in the history
Due to refactoring the const_trait usage, the CopyMarker impl was
accidentally deleted, which had the consequence that the Copy
specialization for the small-sort was never picked.
  • Loading branch information
Voultapher committed Jun 17, 2024
1 parent 7326169 commit b7deff3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions library/core/src/slice/sort/shared/smallsort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ impl<T: FreezeMarker> UnstableSmallSortFreezeTypeImpl for T {
#[rustc_unsafe_specialization_marker]
trait CopyMarker {}

impl<T: Copy> CopyMarker for T {}

impl<T: FreezeMarker + CopyMarker> UnstableSmallSortFreezeTypeImpl for T {
#[inline(always)]
fn small_sort_threshold() -> usize {
Expand Down

0 comments on commit b7deff3

Please sign in to comment.