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 9ad696a commit c496f05Copy full SHA for c496f05
library/std/src/sys/pal/unix/stack_overflow.rs
@@ -157,8 +157,11 @@ mod imp {
157
mem::forget(handler);
158
}
159
160
+ /// # Safety
161
+ /// Must be called only once
162
+ #[forbid(unsafe_op_in_unsafe_fn)]
163
pub unsafe fn cleanup() {
- drop_handler(MAIN_ALTSTACK.load(Ordering::Relaxed));
164
+ unsafe { drop_handler(MAIN_ALTSTACK.load(Ordering::Relaxed)) };
165
166
167
unsafe fn get_stack() -> libc::stack_t {
0 commit comments