Skip to content

Commit 8baead2

Browse files
committed
add reason
1 parent d0a19e9 commit 8baead2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/bevy_tasks/src/task_pool.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -814,7 +814,7 @@ impl<'scope, 'env, T: Send + 'scope> Scope<'scope, 'env, T> {
814814
{
815815
// We box the closure so we can name the type and transmute it to 'scope.
816816
let f: Box<dyn FnOnce() -> T + Send + 'scope> = Box::new(f);
817-
#[expect(unsafe_code)]
817+
#[expect(unsafe_code, reason="required to transmute lifetimes")]
818818
// SAFETY: task is forced to complete before scope is done.
819819
let f: Box<dyn FnOnce() -> T + Send + 'static> = unsafe { mem::transmute(f) };
820820

0 commit comments

Comments
 (0)