We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b703d9f commit 292bca3Copy full SHA for 292bca3
src/marker.rs
@@ -336,7 +336,7 @@ impl<'py> Python<'py> {
336
// access thread-local storage from the current thread.
337
338
// 1. Construct a task
339
- struct Task(*mut dyn FnMut());
+ struct Task(*mut (dyn FnMut() + 'static));
340
unsafe impl Send for Task {}
341
342
let (result_sender, result_receiver) = sync_channel::<Result<T>>(0);
@@ -356,7 +356,7 @@ impl<'py> Python<'py> {
356
};
357
358
// SAFETY: the current thread will block until the closure has returned
359
- let mut task = Task(unsafe { transmute(&mut task as &mut dyn FnMut()) });
+ let mut task = Task(unsafe { transmute(&mut task as &mut (dyn FnMut() + '_)) });
360
361
// 2. Dispatch task to waiting thread, spawn new thread if necessary
362
let trap = PanicTrap::new(
0 commit comments