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 21
21
#![ feature( vecdeque_binary_search) ]
22
22
#![ feature( slice_group_by) ]
23
23
#![ feature( vec_extend_from_within) ]
24
+ #![ feature( vec_spare_capacity) ]
24
25
25
26
use std:: collections:: hash_map:: DefaultHasher ;
26
27
use std:: hash:: { Hash , Hasher } ;
Original file line number Diff line number Diff line change @@ -1691,6 +1691,10 @@ fn test_stable_pointers() {
1691
1691
next_then_drop ( v. splice ( 5 ..6 , vec ! [ 1 ; 10 ] . into_iter ( ) . filter ( |_| true ) ) ) ; // lower bound not exact
1692
1692
assert_eq ! ( * v0, 13 ) ;
1693
1693
1694
+ // spare_capacity_mut
1695
+ v. spare_capacity_mut ( ) ;
1696
+ assert_eq ! ( * v0, 13 ) ;
1697
+
1694
1698
// Smoke test that would fire even outside Miri if an actual relocation happened.
1695
1699
* v0 -= 13 ;
1696
1700
assert_eq ! ( v[ 0 ] , 0 ) ;
You can’t perform that action at this time.
0 commit comments