Skip to content

Commit

Permalink
Fix no_global_oom_handling build
Browse files Browse the repository at this point in the history
`provide_sorted_batch` in core is incorrectly marked with
`#[cfg(not(no_global_oom_handling))]` which prevents core
from building with the cfg enabled.

Nothing in core allocates memory including this function, so
the `cfg` gate is incorrect.
  • Loading branch information
arlosi committed Apr 21, 2023
1 parent 4096619 commit 5731655
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion library/core/src/slice/sort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1456,7 +1456,6 @@ pub struct TimSortRun {

/// Takes a range as denoted by start and end, that is already sorted and extends it to the right if
/// necessary with sorts optimized for smaller ranges such as insertion sort.
#[cfg(not(no_global_oom_handling))]
fn provide_sorted_batch<T, F>(v: &mut [T], start: usize, mut end: usize, is_less: &mut F) -> usize
where
F: FnMut(&T, &T) -> bool,
Expand Down

0 comments on commit 5731655

Please sign in to comment.