From 572873fce0365cbba75557458ee5d7cb744bac12 Mon Sep 17 00:00:00 2001 From: the8472 Date: Sun, 4 Apr 2021 01:38:58 +0200 Subject: [PATCH] suggestion from review Co-authored-by: Ralf Jung --- library/alloc/tests/vec.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/alloc/tests/vec.rs b/library/alloc/tests/vec.rs index 026d3f63bb77a..cdd18520c599c 100644 --- a/library/alloc/tests/vec.rs +++ b/library/alloc/tests/vec.rs @@ -1091,7 +1091,7 @@ fn test_from_iter_specialization_panic_during_drop_leaks() { assert_eq!(unsafe { DROP_COUNTER }, 1); // clean up the leak to keep miri happy unsafe { - Vec::from_raw_parts(to_free, 0, cap); + drop(Vec::from_raw_parts(to_free, 0, cap)); } }