Skip to content

Doesn't compile out of the box on mac #27

@FabriceCastel

Description

@FabriceCastel

When I set the project up with the latest stable Rust release and cargo run it, I get 27 errors from lexical-core-0.4.6, it's various flavors of this:

error[E0308]: mismatched types
   --> /Users/fab/.cargo/registry/src/github.com-1ecc6299db9ec823/lexical-core-0.4.6/src/atof/algorithm/bigcomp.rs:243:55
    |
243 |     let nlz = den.leading_zeros().wrapping_sub(wlz) & (u32::BITS - 1);
    |                                                       ^^^^^^^^^^^^^^^ expected `usize`, found `u32`

error[E0277]: no implementation for `usize & u32`
   --> /Users/fab/.cargo/registry/src/github.com-1ecc6299db9ec823/lexical-core-0.4.6/src/atof/algorithm/bigcomp.rs:243:53
    |
243 |     let nlz = den.leading_zeros().wrapping_sub(wlz) & (u32::BITS - 1);
    |                                                     ^ no implementation for `usize & u32`
    |
    = help: the trait `BitAnd<u32>` is not implemented for `usize`

Seems related to rust-lang/rust#81654, which leads me to believe this could be fixed with a dependency update. I'm relatively new to Rust so I haven't been able to fix it locally yet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions