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
When I add tokio-modbus as a dependencies, cargo build will failed.
Reproduction:
cargo new a new project
add tokio-modbus = "0.5.3" to Cargo.toml
copy the example tcp-client code to main.rs
run cargo build, and show:
Compiling mio-serial v5.0.3
error[E0308]: mismatched types
--> C:\Users\dell\.cargo\registry\src\mirrors.ustc.edu.cn-61ef6e0cd06fb9b8\mio-serial-5.0.3\src\lib.rs:822:42
|
822 | let r = unsafe { SetCommTimeouts(handle, &mut timeouts) };
| --------------- ^^^^^^ expected enum `winapi::ctypes::c_void`, found enum `std::ffi::c_void`
| |
| arguments to this function are incorrect
|
= note: expected raw pointer `*mut winapi::ctypes::c_void`
found raw pointer `*mut std::ffi::c_void`
note: function defined here
--> C:\Users\dell\.cargo\registry\src\mirrors.ustc.edu.cn-61ef6e0cd06fb9b8\winapi-0.3.9\src\um\commapi.rs:74:12
|
74 | pub fn SetCommTimeouts(
| ^^^^^^^^^^^^^^^
For more information about this error, try `rustc --explain E0308`.
error: could not compile `mio-serial` due to previous error
When I add
tokio-modbus
as a dependencies,cargo build
will failed.Reproduction:
cargo new
a new projecttokio-modbus = "0.5.3"
to Cargo.tomltcp-client
code tomain.rs
cargo build
, and show:Environment:
Win10
rustc 1.65.0 (897e37553 2022-11-02)
rustup 1.25.1 (bb60b1e89 2022-07-12)
x86_64-pc-windows-msvc
The text was updated successfully, but these errors were encountered: