]> git.lizzy.rs Git - rust.git/commitdiff
suggestion from review
authorthe8472 <the8472@users.noreply.github.com>
Sat, 3 Apr 2021 23:38:58 +0000 (01:38 +0200)
committerGitHub <noreply@github.com>
Sat, 3 Apr 2021 23:38:58 +0000 (01:38 +0200)
Co-authored-by: Ralf Jung <post@ralfj.de>
library/alloc/tests/vec.rs

index 026d3f63bb77ae404a2745c58858519cd607de1d..cdd18520c599c3ba595b28c221f86ab0d9d44945 100644 (file)
@@ -1091,7 +1091,7 @@ fn drop(&mut self) {
     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));
     }
 }