Skip to content

Commit dcc2321

Browse files
committed
The const_forget_box was unused, and doesns't add anything to test by itself.
1 parent 57b1e7a commit dcc2321

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

src/libcore/tests/mem.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,4 @@ fn test_discriminant_send_sync() {
134134
fn test_const_forget() {
135135
const _: () = forget(0i32);
136136
const _: () = forget(Vec::<Vec<Box<i32>>>::new());
137-
138-
// Writing this function signature without const-forget
139-
// triggers compiler errors:
140-
// 1) That we use a non-const fn inside a const fn
141-
// 2) without the forget, it complains about the destructor of Box
142-
const fn const_forget_box<T>(x: Box<T>) {
143-
forget(x);
144-
}
145137
}

0 commit comments

Comments
 (0)