File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change 2121#![ feature( vecdeque_binary_search) ]
2222#![ feature( slice_group_by) ]
2323#![ feature( vec_extend_from_within) ]
24+ #![ feature( vec_spare_capacity) ]
2425
2526use std:: collections:: hash_map:: DefaultHasher ;
2627use std:: hash:: { Hash , Hasher } ;
Original file line number Diff line number Diff line change @@ -1691,6 +1691,10 @@ fn test_stable_pointers() {
16911691 next_then_drop ( v. splice ( 5 ..6 , vec ! [ 1 ; 10 ] . into_iter ( ) . filter ( |_| true ) ) ) ; // lower bound not exact
16921692 assert_eq ! ( * v0, 13 ) ;
16931693
1694+ // spare_capacity_mut
1695+ v. spare_capacity_mut ( ) ;
1696+ assert_eq ! ( * v0, 13 ) ;
1697+
16941698 // Smoke test that would fire even outside Miri if an actual relocation happened.
16951699 * v0 -= 13 ;
16961700 assert_eq ! ( v[ 0 ] , 0 ) ;
You can’t perform that action at this time.
0 commit comments