From dcc23217b7364056d5a83aaa058993ccd83b6e78 Mon Sep 17 00:00:00 2001 From: DutchGhost Date: Mon, 16 Mar 2020 13:24:59 +0100 Subject: [PATCH] The const_forget_box was unused, and doesns't add anything to test by itself. --- src/libcore/tests/mem.rs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/libcore/tests/mem.rs b/src/libcore/tests/mem.rs index 2329bf97ff5b..1502c9ac3753 100644 --- a/src/libcore/tests/mem.rs +++ b/src/libcore/tests/mem.rs @@ -134,12 +134,4 @@ fn test_discriminant_send_sync() { fn test_const_forget() { const _: () = forget(0i32); const _: () = forget(Vec::>>::new()); - - // Writing this function signature without const-forget - // triggers compiler errors: - // 1) That we use a non-const fn inside a const fn - // 2) without the forget, it complains about the destructor of Box - const fn const_forget_box(x: Box) { - forget(x); - } }