We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 57b1e7a commit dcc2321Copy full SHA for dcc2321
src/libcore/tests/mem.rs
@@ -134,12 +134,4 @@ fn test_discriminant_send_sync() {
134
fn test_const_forget() {
135
const _: () = forget(0i32);
136
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
- }
145
}
0 commit comments