-
Notifications
You must be signed in to change notification settings - Fork 145
Closed
Description
When I add tokio-modbus as a dependencies, cargo build will failed.
Reproduction:
cargo newa new project- add
tokio-modbus = "0.5.3"to Cargo.toml - copy the example
tcp-clientcode tomain.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
Environment:
Win10
rustc 1.65.0 (897e37553 2022-11-02)
rustup 1.25.1 (bb60b1e89 2022-07-12)
x86_64-pc-windows-msvc
Metadata
Metadata
Assignees
Labels
No labels