From e807a6efc83f4b8667e1e6e1177d3cc1502045e3 Mon Sep 17 00:00:00 2001 From: Richard Feldman Date: Wed, 8 Jul 2026 16:16:28 -0400 Subject: [PATCH] gpui_windows: Give the window-create pointer mutable provenance The WndProc recovers the CreateWindowExW lpParam as *mut WindowCreateContext and writes through it, but the pointer was derived from a shared reference, so it lacked mutable provenance. Derive it from &raw mut instead. --- crates/gpui_windows/src/window.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/gpui_windows/src/window.rs b/crates/gpui_windows/src/window.rs index b9715d4824d..6a5d823c838 100644 --- a/crates/gpui_windows/src/window.rs +++ b/crates/gpui_windows/src/window.rs @@ -537,7 +537,10 @@ impl WindowsWindow { parent_hwnd, None, Some(hinstance.into()), - Some(&context as *const _ as *const _), + // The `WndProc` recovers this as `*mut WindowCreateContext` and writes + // through it (setting `inner`), so the pointer must carry mutable + // provenance. Derive it from `&raw mut` rather than a shared reference. + Some(&raw mut context as *const _), ) };