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
$ git clone https://github.com/eminence/procfs.git
$ cd procfs
$ git checkout v0.17.0
$ cargo test
[…]
error[E0308]: mismatched types
--> procfs/src/process/tests.rs:461:52
|
461 | assert_eq!(v, unsafe { libc::getauxval(k) });
| --------------- ^ expected `u32`, found `u64`
| |
| arguments to this function are incorrect
|
note: function defined here
--> /builddir/.cargo/registry/src/index.crates.io-1cd66030c949c28d/libc-0.2.169/src/unix/linux_like/linux/gnu/mod.rs:1340:12
|
1340 | pub fn getauxval(type_: c_ulong) -> c_ulong;
| ^^^^^^^^^
help: you can convert a `u64` to a `u32` and panic if the converted value doesn't fit
|
461 | assert_eq!(v, unsafe { libc::getauxval(k.try_into().unwrap()) });
| ++++++++++++++++++++
error[E0308]: mismatched types
--> procfs/src/process/tests.rs:461:27
|
461 | assert_eq!(v, unsafe { libc::getauxval(k) });
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u64`, found `u32`
|
help: you can convert a `u32` to a `u64`
|
461 | assert_eq!(v, unsafe { libc::getauxval(k).into() });
| +++++++
For more information about this error, try `rustc --explain E0308`.
warning: `procfs` (lib test) generated 2 warnings (1 duplicate)
error: could not compile `procfs` (lib test) due to 2 previous errors; 2 warnings emitted
The Rust compiler seems to have good suggestions; I’ll try them and open a PR.
The text was updated successfully, but these errors were encountered:
On
i686
:The Rust compiler seems to have good suggestions; I’ll try them and open a PR.
The text was updated successfully, but these errors were encountered: