File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 32
32
const_align_of_val,
33
33
// Needed for field_offset!
34
34
const_refs_to_cell,
35
+ // Used instead of drain_filter
36
+ extract_if,
35
37
) ]
36
- #![ feature( drain_filter) ]
37
38
#![ allow(
38
39
/*
39
40
* TODO: Should we be relying on vtable address stability?
@@ -525,7 +526,7 @@ impl SimpleAlloc {
525
526
let mut actual_size = 0 ;
526
527
// Clear small arenas
527
528
let was_mark_inverted = self . mark_inverted . load ( Ordering :: SeqCst ) ;
528
- self . small_objects . lock ( ) . drain_filter ( |& mut common_header| {
529
+ self . small_objects . lock ( ) . extract_if ( |& mut common_header| {
529
530
let total_size = ( * common_header) . type_info . determine_total_size ( common_header) ;
530
531
match ( * common_header) . raw_mark_state ( ) . resolve ( was_mark_inverted) {
531
532
MarkState :: White => {
@@ -556,7 +557,7 @@ impl SimpleAlloc {
556
557
} ) ;
557
558
// Clear large objects
558
559
debug_assert_eq ! ( was_mark_inverted, self . mark_inverted( ) ) ;
559
- self . big_objects . lock ( ) . drain_filter ( |big_item| {
560
+ self . big_objects . lock ( ) . extract_if ( |big_item| {
560
561
let total_size = big_item. header ( ) . type_info . determine_total_size ( big_item. header . as_ptr ( ) ) ;
561
562
match big_item. header ( ) . mark_data . load_snapshot ( ) . state . resolve ( was_mark_inverted) {
562
563
MarkState :: White => {
You can’t perform that action at this time.
0 commit comments