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

Open
@rlyders

Description

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

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions