@@ -101,6 +101,11 @@ pub fn check_erase_2(mut key_destructor: bool, mut value_destructor: bool) {
101101 Rc :: new ( RefCell :: new ( Map :: erase (
102102 m. as_pointer ( ) ,
103103 & ( { ( * middle. borrow ( ) ) . clone ( ) } ) ,
104+ |__key, __value| {
105+ use libcc2rs:: __swap:: { Destroy , DestroyNone , DestroyWithDtor } ;
106+ ( & & Destroy ( & __value) ) . destroy ( ) ;
107+ ( & & Destroy ( & __key) ) . destroy ( ) ;
108+ } ,
104109 ) ) ) ;
105110 assert ! (
106111 ( ( {
@@ -175,7 +180,15 @@ pub fn check_erase_2(mut key_destructor: bool, mut value_destructor: bool) {
175180 ) ,
176181 ) ,
177182 ) ;
178- ( * next. borrow_mut ( ) ) = Map :: erase ( m. as_pointer ( ) , & ( { ( * const_first. borrow ( ) ) . clone ( ) } ) ) ;
183+ ( * next. borrow_mut ( ) ) = Map :: erase (
184+ m. as_pointer ( ) ,
185+ & ( { ( * const_first. borrow ( ) ) . clone ( ) } ) ,
186+ |__key, __value| {
187+ use libcc2rs:: __swap:: { Destroy , DestroyNone , DestroyWithDtor } ;
188+ ( & & Destroy ( & __value) ) . destroy ( ) ;
189+ ( & & Destroy ( & __key) ) . destroy ( ) ;
190+ } ,
191+ ) ;
179192 assert ! (
180193 ( ( {
181194 let __idx0 = ( 1 ) as usize ;
@@ -204,7 +217,15 @@ pub fn check_erase_2(mut key_destructor: bool, mut value_destructor: bool) {
204217 } == { ( last_value) . clone( ) } )
205218 } )
206219 ) ;
207- ( * next. borrow_mut ( ) ) = Map :: erase ( m. as_pointer ( ) , & ( { ( * last. borrow ( ) ) . clone ( ) } ) ) ;
220+ ( * next. borrow_mut ( ) ) = Map :: erase (
221+ m. as_pointer ( ) ,
222+ & ( { ( * last. borrow ( ) ) . clone ( ) } ) ,
223+ |__key, __value| {
224+ use libcc2rs:: __swap:: { Destroy , DestroyNone , DestroyWithDtor } ;
225+ ( & & Destroy ( & __value) ) . destroy ( ) ;
226+ ( & & Destroy ( & __key) ) . destroy ( ) ;
227+ } ,
228+ ) ;
208229 assert ! (
209230 ( ( {
210231 let __idx0 = ( 3 ) as usize ;
@@ -295,6 +316,11 @@ pub fn check_erase_3(mut key_destructor: bool, mut value_destructor: bool) {
295316 Rc :: new ( RefCell :: new ( Map :: erase (
296317 m. as_pointer ( ) ,
297318 & ( { ( * middle. borrow ( ) ) . clone ( ) } ) ,
319+ |__key, __value| {
320+ use libcc2rs:: __swap:: { Destroy , DestroyNone , DestroyWithDtor } ;
321+ ( & & Destroy ( & __value) ) . destroy ( ) ;
322+ ( & & Destroy ( & __key) ) . destroy ( ) ;
323+ } ,
298324 ) ) ) ;
299325 assert ! (
300326 ( ( {
@@ -367,7 +393,15 @@ pub fn check_erase_3(mut key_destructor: bool, mut value_destructor: bool) {
367393 ( { ( * first. borrow ( ) ) . clone ( ) } ) ,
368394 ) ) ,
369395 ) ;
370- ( * next. borrow_mut ( ) ) = Map :: erase ( m. as_pointer ( ) , & ( { ( * const_first. borrow ( ) ) . clone ( ) } ) ) ;
396+ ( * next. borrow_mut ( ) ) = Map :: erase (
397+ m. as_pointer ( ) ,
398+ & ( { ( * const_first. borrow ( ) ) . clone ( ) } ) ,
399+ |__key, __value| {
400+ use libcc2rs:: __swap:: { Destroy , DestroyNone , DestroyWithDtor } ;
401+ ( & & Destroy ( & __value) ) . destroy ( ) ;
402+ ( & & Destroy ( & __key) ) . destroy ( ) ;
403+ } ,
404+ ) ;
371405 assert ! (
372406 ( ( {
373407 let __idx0 = ( 1 ) as usize ;
@@ -396,7 +430,15 @@ pub fn check_erase_3(mut key_destructor: bool, mut value_destructor: bool) {
396430 } == { ( last_value) . clone( ) } )
397431 } )
398432 ) ;
399- ( * next. borrow_mut ( ) ) = Map :: erase ( m. as_pointer ( ) , & ( { ( * last. borrow ( ) ) . clone ( ) } ) ) ;
433+ ( * next. borrow_mut ( ) ) = Map :: erase (
434+ m. as_pointer ( ) ,
435+ & ( { ( * last. borrow ( ) ) . clone ( ) } ) ,
436+ |__key, __value| {
437+ use libcc2rs:: __swap:: { Destroy , DestroyNone , DestroyWithDtor } ;
438+ ( & & Destroy ( & __value) ) . destroy ( ) ;
439+ ( & & Destroy ( & __key) ) . destroy ( ) ;
440+ } ,
441+ ) ;
400442 assert ! (
401443 ( ( {
402444 let __idx0 = ( 3 ) as usize ;
@@ -485,6 +527,11 @@ pub fn check_erase_4(mut key_destructor: bool, mut value_destructor: bool) {
485527 Rc :: new ( RefCell :: new ( Map :: erase (
486528 m. as_pointer ( ) ,
487529 & ( { ( * middle. borrow ( ) ) . clone ( ) } ) ,
530+ |__key, __value| {
531+ use libcc2rs:: __swap:: { Destroy , DestroyNone , DestroyWithDtor } ;
532+ ( & & Destroy ( & __value) ) . destroy ( ) ;
533+ ( & & Destroy ( & __key) ) . destroy ( ) ;
534+ } ,
488535 ) ) ) ;
489536 assert ! (
490537 ( ( {
@@ -555,7 +602,15 @@ pub fn check_erase_4(mut key_destructor: bool, mut value_destructor: bool) {
555602 ( { ( * first. borrow ( ) ) . clone ( ) } ) ,
556603 ) ) ,
557604 ) ;
558- ( * next. borrow_mut ( ) ) = Map :: erase ( m. as_pointer ( ) , & ( { ( * const_first. borrow ( ) ) . clone ( ) } ) ) ;
605+ ( * next. borrow_mut ( ) ) = Map :: erase (
606+ m. as_pointer ( ) ,
607+ & ( { ( * const_first. borrow ( ) ) . clone ( ) } ) ,
608+ |__key, __value| {
609+ use libcc2rs:: __swap:: { Destroy , DestroyNone , DestroyWithDtor } ;
610+ ( & & Destroy ( & __value) ) . destroy ( ) ;
611+ ( & & Destroy ( & __key) ) . destroy ( ) ;
612+ } ,
613+ ) ;
559614 assert ! (
560615 ( ( {
561616 let __idx0 = ( 1 ) as usize ;
@@ -584,7 +639,15 @@ pub fn check_erase_4(mut key_destructor: bool, mut value_destructor: bool) {
584639 } == { ( last_value) . clone( ) } )
585640 } )
586641 ) ;
587- ( * next. borrow_mut ( ) ) = Map :: erase ( m. as_pointer ( ) , & ( { ( * last. borrow ( ) ) . clone ( ) } ) ) ;
642+ ( * next. borrow_mut ( ) ) = Map :: erase (
643+ m. as_pointer ( ) ,
644+ & ( { ( * last. borrow ( ) ) . clone ( ) } ) ,
645+ |__key, __value| {
646+ use libcc2rs:: __swap:: { Destroy , DestroyNone , DestroyWithDtor } ;
647+ ( & & Destroy ( & __value) ) . destroy ( ) ;
648+ ( & & Destroy ( & __key) ) . destroy ( ) ;
649+ } ,
650+ ) ;
588651 assert ! (
589652 ( ( {
590653 let __idx0 = ( 3 ) as usize ;
@@ -668,9 +731,16 @@ pub fn check_erase_5(mut key_destructor: bool, mut value_destructor: bool) {
668731 m. as_pointer ( )
669732 . with ( |__m : & Map < i32 , ( Value < i32 > , Value < i32 > ) > | __m. end ( ) ) ,
670733 ) ) ;
671- let next: Value < BidirectionalIterator < ( Value < i32 > , Value < i32 > ) > > = Rc :: new ( RefCell :: new (
672- Map :: erase ( m. as_pointer ( ) , & ( { ( * middle. borrow ( ) ) . clone ( ) } ) ) ,
673- ) ) ;
734+ let next: Value < BidirectionalIterator < ( Value < i32 > , Value < i32 > ) > > =
735+ Rc :: new ( RefCell :: new ( Map :: erase (
736+ m. as_pointer ( ) ,
737+ & ( { ( * middle. borrow ( ) ) . clone ( ) } ) ,
738+ |__key, __value| {
739+ use libcc2rs:: __swap:: { Destroy , DestroyNone , DestroyWithDtor } ;
740+ ( & & Destroy ( & __value) ) . destroy ( ) ;
741+ ( & & Destroy ( & __key) ) . destroy ( ) ;
742+ } ,
743+ ) ) ) ;
674744 assert ! (
675745 ( ( {
676746 let __idx0 = ( 2 ) as usize ;
@@ -741,7 +811,15 @@ pub fn check_erase_5(mut key_destructor: bool, mut value_destructor: bool) {
741811 ( { ( * first. borrow ( ) ) . clone ( ) } ) ,
742812 ) ) ,
743813 ) ;
744- ( * next. borrow_mut ( ) ) = Map :: erase ( m. as_pointer ( ) , & ( { ( * const_first. borrow ( ) ) . clone ( ) } ) ) ;
814+ ( * next. borrow_mut ( ) ) = Map :: erase (
815+ m. as_pointer ( ) ,
816+ & ( { ( * const_first. borrow ( ) ) . clone ( ) } ) ,
817+ |__key, __value| {
818+ use libcc2rs:: __swap:: { Destroy , DestroyNone , DestroyWithDtor } ;
819+ ( & & Destroy ( & __value) ) . destroy ( ) ;
820+ ( & & Destroy ( & __key) ) . destroy ( ) ;
821+ } ,
822+ ) ;
745823 assert ! (
746824 ( ( {
747825 let __idx0 = ( 1 ) as usize ;
@@ -770,7 +848,15 @@ pub fn check_erase_5(mut key_destructor: bool, mut value_destructor: bool) {
770848 } == { ( last_value) . clone( ) } )
771849 } )
772850 ) ;
773- ( * next. borrow_mut ( ) ) = Map :: erase ( m. as_pointer ( ) , & ( { ( * last. borrow ( ) ) . clone ( ) } ) ) ;
851+ ( * next. borrow_mut ( ) ) = Map :: erase (
852+ m. as_pointer ( ) ,
853+ & ( { ( * last. borrow ( ) ) . clone ( ) } ) ,
854+ |__key, __value| {
855+ use libcc2rs:: __swap:: { Destroy , DestroyNone , DestroyWithDtor } ;
856+ ( & & Destroy ( & __value) ) . destroy ( ) ;
857+ ( & & Destroy ( & __key) ) . destroy ( ) ;
858+ } ,
859+ ) ;
774860 assert ! (
775861 ( ( {
776862 let __idx0 = ( 3 ) as usize ;
0 commit comments