mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
Add another assertion without into_iter
This commit is contained in:
parent
4b53f563bd
commit
d9a438dc73
@ -1009,10 +1009,14 @@ fn test_into_iter_drop_allocator() {
|
||||
}
|
||||
|
||||
let mut drop_count = 0;
|
||||
|
||||
let allocator = ReferenceCountedAllocator(DropCounter { count: &mut drop_count });
|
||||
let _ = Vec::<u32, _>::new_in(allocator);
|
||||
assert_eq!(drop_count, 1);
|
||||
|
||||
let allocator = ReferenceCountedAllocator(DropCounter { count: &mut drop_count });
|
||||
let _ = Vec::<u32, _>::new_in(allocator).into_iter();
|
||||
|
||||
assert_eq!(drop_count, 1);
|
||||
assert_eq!(drop_count, 2);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
Loading…
Reference in New Issue
Block a user