Skip to content

Commit 48d6536

Browse files
committed
Reformat code to workaround clippy bug
The fix for rust-lang/rust-clippy#15915 is taken a bit too long to land.
1 parent d835481 commit 48d6536

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/backend/emscripten.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ unsafe impl ThrowByPointer for ActiveBackend {
4242
#[inline(always)]
4343
fn intercept<Func: FnOnce() -> R, R>(func: Func) -> Result<R, *mut Header> {
4444
let ptr = match intercept(func, |ex| {
45-
// SAFETY: `core::intrinsics::catch_unwind` provides a pointer to a stack-allocated
46-
// instance of `CatchData`. It needs to be read inside the `intercept` callback because
47-
// it'll be dead by the moment `intercept` returns.
4845
#[expect(
4946
clippy::cast_ptr_alignment,
5047
reason = "guaranteed to be aligned by rustc"
5148
)]
49+
// SAFETY: `core::intrinsics::catch_unwind` provides a pointer to a stack-allocated
50+
// instance of `CatchData`. It needs to be read inside the `intercept` callback because
51+
// it'll be dead by the moment `intercept` returns.
5252
unsafe {
5353
(*ex.cast::<CatchData>()).ptr
5454
}

0 commit comments

Comments
 (0)