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
Running the basic sample for create-window gives the error:
"expected raw pointer *mut u8
found raw pointer *const u8"
This seems to be the offending line: lpszClassName: PSTR(b"window\0".as_ptr()),
The function .as_ptr() gives a *const u8 but the expected type for lpszClassName is *mut u8.
My Cargo.toml file has:
[dependencies.windows]
features = [
"alloc",
"Win32_Foundation",
"Win32_Graphics_Gdi",
"Win32_System_LibraryLoader",
"Win32_UI_WindowsAndMessaging",
]
Expected behavior
I expected the sample create-windows to work
Actual behavior
I got a compiler error: error[E0308]: mismatched types
Additional comments
No response
The text was updated successfully, but these errors were encountered:
This seems to be the same issue as #777. In that case the upcoming release of 0.31.0 will address this. The recently imported metadata version 17.0.9 provides the appropriate [Const] annotations for the respective fields in the WNDCLASSA structure.
Which crate is this about?
windows
Crate version
0.30.0
Summary
Running the basic sample for create-window gives the error:
"expected raw pointer
*mut u8
found raw pointer
*const u8
"This seems to be the offending line: lpszClassName: PSTR(b"window\0".as_ptr()),
The function .as_ptr() gives a *const u8 but the expected type for lpszClassName is *mut u8.
My Cargo.toml file has:
[dependencies.windows]
features = [
"alloc",
"Win32_Foundation",
"Win32_Graphics_Gdi",
"Win32_System_LibraryLoader",
"Win32_UI_WindowsAndMessaging",
]
Expected behavior
I expected the sample create-windows to work
Actual behavior
I got a compiler error: error[E0308]: mismatched types
Additional comments
No response
The text was updated successfully, but these errors were encountered: