You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I am building on win 11 x64 for the target i686-pc-windows-msvc, if I don't specify a target, then everything goes fine.
Console output
error[E0308]: mismatched types
--> C:\Users\User\.cargo\registry\src\github.com-1ecc6299db9ec823\accesskit_windows-0.12.0\src\subclass.rs:69:67
|
69 | self.prev_wnd_proc = unsafe { transmute::(result) };
| --------------------------- ^^^^^^ expected `isize`, found `i32`
| |
| arguments to this function are incorrect
|
note: function defined here
--> C:\Users\User\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\core\src\intrinsics.rs:1255:12
|
1255 | pub fn transmute(src: Src) -> Dst;
| ^^^^^^^^^
help: you can convert an `i32` to an `isize` and panic if the converted value doesn't fit
|
69 | self.prev_wnd_proc = unsafe { transmute::(result.try_into().unwrap()) };
| ++++++++++++++++++++
error[E0308]: mismatched types
--> C:\Users\User.cargo\registry\src\github.com-1ecc6299db9ec823\accesskit_windows-0.12.0\src\subclass.rs:80:17
|
77 | SetWindowLongPtrW(
| ----------------- arguments to this function are incorrect
...
80 | transmute::<WNDPROC, isize>(self.prev_wnd_proc),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected i32, found isize
|
note: function defined here
--> C:\Users\User.cargo\registry\src\github.com-1ecc6299db9ec823\windows-0.42.0\src\Windows\Win32\UI\WindowsAndMessaging\mod.rs:4776:15
|
4776 | pub unsafe fn SetWindowLongW<'a, P0>(hwnd: P0, nindex: WINDOW_LONG_PTR_INDEX, dwnewlong: i32) -> i32
| ^^^^^^^^^^^^^^
help: you can convert an isize to an i32 and panic if the converted value doesn't fit
|
80 | transmute::<WNDPROC, isize>(self.prev_wnd_proc).try_into().unwrap(),
| ++++++++++++++++++++
For more information about this error, try rustc --explain E0308.
error: could not compile accesskit_windows due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
The text was updated successfully, but these errors were encountered:
Get the solution by reading the latest source code of accesskit. Manually edit accesskit_windows-0.12.0\src\subclass.rs, add in the file header: #[cfg(any(target_arch = "x86_64", target_arch = "aarch64"))]
type LongPtr = isize;
#[cfg(not(any(target_arch = "x86_64", target_arch = "aarch64")))]
type LongPtr = i32; then replace the isize bit with LongPtr. Compilation succeeded. This should be a problem with the accesskit version, and the egui update related dependencies to the latest should be able to solve it later
[patch.crates-io]
egui = { version = "0.21.0", optional = true }
eframe = { version = "0.21.3", optional = true }
Describe the bug
I am building on win 11 x64 for the target i686-pc-windows-msvc, if I don't specify a target, then everything goes fine.
Console output
error[E0308]: mismatched types --> C:\Users\User\.cargo\registry\src\github.com-1ecc6299db9ec823\accesskit_windows-0.12.0\src\subclass.rs:69:67 | 69 | self.prev_wnd_proc = unsafe { transmute::(result) }; | --------------------------- ^^^^^^ expected `isize`, found `i32` | | | arguments to this function are incorrect | note: function defined here --> C:\Users\User\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\core\src\intrinsics.rs:1255:12 | 1255 | pub fn transmute(src: Src) -> Dst; | ^^^^^^^^^ help: you can convert an `i32` to an `isize` and panic if the converted value doesn't fit | 69 | self.prev_wnd_proc = unsafe { transmute::(result.try_into().unwrap()) }; | ++++++++++++++++++++
error[E0308]: mismatched types
--> C:\Users\User.cargo\registry\src\github.com-1ecc6299db9ec823\accesskit_windows-0.12.0\src\subclass.rs:80:17
|
77 | SetWindowLongPtrW(
| ----------------- arguments to this function are incorrect
...
80 | transmute::<WNDPROC, isize>(self.prev_wnd_proc),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected
i32
, foundisize
|
note: function defined here
--> C:\Users\User.cargo\registry\src\github.com-1ecc6299db9ec823\windows-0.42.0\src\Windows\Win32\UI\WindowsAndMessaging\mod.rs:4776:15
|
4776 | pub unsafe fn SetWindowLongW<'a, P0>(hwnd: P0, nindex: WINDOW_LONG_PTR_INDEX, dwnewlong: i32) -> i32
| ^^^^^^^^^^^^^^
help: you can convert an
isize
to ani32
and panic if the converted value doesn't fit|
80 | transmute::<WNDPROC, isize>(self.prev_wnd_proc).try_into().unwrap(),
| ++++++++++++++++++++
For more information about this error, try
rustc --explain E0308
.error: could not compile
accesskit_windows
due to 2 previous errorswarning: build failed, waiting for other jobs to finish...
The text was updated successfully, but these errors were encountered: