Skip to content

[on Mac M4]: procinfo-0.4.2/src/pid/status.rs:189:1 expected u16 found u32: named!(parse_umask<mode_t>, delimited!(tag!("Umask:\t"), parse_u32_octal, line_ending #49

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
rlyders opened this issue Jan 13, 2025 · 0 comments

Comments

@rlyders
Copy link

rlyders commented Jan 13, 2025

While compiling procinfo-0.4.2 on Mac with M4 CPU, the following error is reported in file /src/pid/status.rs line 189: expected u16, found u32

System info: Mac Mini Apple M4 : MacOS Sequoia 15.2 : Darwin arm64 24.2.0

Full log below:

error: could not compile `procinfo` (lib) due to 1 previous error
   Compiling procinfo v0.4.2
error[E0308]: mismatched types
   --> /Users/richardlyders/.cargo/registry/src/index.crates.io-6f17d22bba15001f/procinfo-0.4.2/src/pid/status.rs:189:1
    |
189 | named!(parse_umask<mode_t>,     delimited!(tag!("Umask:\t"),     parse_u32_octal,    line_ending...
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | |
    | expected `u16`, found `u32`
    | arguments to this enum variant are incorrect
    |
help: the type constructed contains `u32` due to the type of the argument passed
   --> /Users/richardlyders/.cargo/registry/src/index.crates.io-6f17d22bba15001f/procinfo-0.4.2/src/pid/status.rs:189:1
    |
189 | named!(parse_umask<mode_t>,     delimited!(tag!("Umask:\t"),     parse_u32_octal,    line_ending...
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this argument influences the type of `$crate`
note: tuple variant defined here
   --> /Users/richardlyders/.cargo/registry/src/index.crates.io-6f17d22bba15001f/nom-2.2.1/src/internal.rs:59:3
    |
59  |   Done(I,O),
    |   ^^^^
    = note: this error originates in the macro `delimited` which comes from the expansion of the macro `named` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0308`.
error: could not compile `procinfo` (lib) due to 1 previous error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant