about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDutchGhost <kasper199914@gmail.com>2020-03-16 13:24:59 +0100
committerDutchGhost <kasper199914@gmail.com>2020-03-16 13:24:59 +0100
commitdcc23217b7364056d5a83aaa058993ccd83b6e78 (patch)
tree02720ffcf2ba37939c97b0efa99e094eb30303c9
parent57b1e7a428c16a1b692b88cc25ce8b09d8ea503b (diff)
downloadrust-dcc23217b7364056d5a83aaa058993ccd83b6e78.tar.gz
rust-dcc23217b7364056d5a83aaa058993ccd83b6e78.zip
The const_forget_box was unused, and doesns't add anything to test by itself.
-rw-r--r--src/libcore/tests/mem.rs8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/libcore/tests/mem.rs b/src/libcore/tests/mem.rs
index 2329bf97ff5..1502c9ac375 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::<Vec<Box<i32>>>::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<T>(x: Box<T>) {
-        forget(x);
-    }
 }