The const_forget_box was unused, and doesns't add anything to test by itself.
This commit is contained in:
parent
57b1e7a428
commit
dcc23217b7
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user