Skip to content
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

Cant Compile on rustc 1.55 #1

Closed
geoeo opened this issue Oct 8, 2021 · 1 comment
Closed

Cant Compile on rustc 1.55 #1

geoeo opened this issue Oct 8, 2021 · 1 comment

Comments

@geoeo
Copy link

geoeo commented Oct 8, 2021

I didnt install embree first though, but I dont think this is the issue. Seems like this wont work currently. Can anybody confirm this?

error[E0308]: mismatched types
   --> C:\Users\Marc\.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`

   Compiling rayon v1.3.0
error[E0277]: no implementation for `usize & u32`
   --> C:\Users\Marc\.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`

error[E0308]: mismatched types
   --> C:\Users\Marc\.cargo\registry\src\github.com-1ecc6299db9ec823\lexical-core-0.4.6\src\atof\algorithm\bigcomp.rs:261:40
    |
261 |         let (q, r) = shift.ceil_divmod(Limb::BITS);
    |                                        ^^^^^^^^^^ expected `usize`, found `u32`
    |
help: you can convert a `u32` to a `usize` and panic if the converted value doesn't fit
    |
261 |         let (q, r) = shift.ceil_divmod(Limb::BITS.try_into().unwrap());
    |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
  --> C:\Users\Marc\.cargo\registry\src\github.com-1ecc6299db9ec823\lexical-core-0.4.6\src\atof\algorithm\bigint.rs:85:24
   |
85 |     let bytes = bits / Limb::BITS;
   |                        ^^^^^^^^^^ expected `usize`, found `u32`

error[E0277]: cannot divide `usize` by `u32`
  --> C:\Users\Marc\.cargo\registry\src\github.com-1ecc6299db9ec823\lexical-core-0.4.6\src\atof\algorithm\bigint.rs:85:22
   |
85 |     let bytes = bits / Limb::BITS;
   |                      ^ no implementation for `usize / u32`
   |
   = help: the trait `Div<u32>` is not implemented for `usize`

error[E0308]: mismatched types
    --> C:\Users\Marc\.cargo\registry\src\github.com-1ecc6299db9ec823\lexical-core-0.4.6\src\atof\algorithm\math.rs:1045:42
     |
1045 |     let mut count = index.saturating_mul(Limb::BITS);
     |                                          ^^^^^^^^^^ expected `usize`, found `u32`
     |
help: you can convert a `u32` to a `usize` and panic if the converted value doesn't fit
     |
1045 |     let mut count = index.saturating_mul(Limb::BITS.try_into().unwrap());
     |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
    --> C:\Users\Marc\.cargo\registry\src\github.com-1ecc6299db9ec823\lexical-core-0.4.6\src\atof\algorithm\math.rs:1060:28
     |
1060 |     Limb::BITS.checked_mul(x.len())
     |                            ^^^^^^^ expected `u32`, found `usize`
     |
help: you can convert a `usize` to a `u32` and panic if the converted value doesn't fit
     |
1060 |     Limb::BITS.checked_mul(x.len().try_into().unwrap())
     |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
    --> C:\Users\Marc\.cargo\registry\src\github.com-1ecc6299db9ec823\lexical-core-0.4.6\src\atof\algorithm\math.rs:1061:22
     |
1061 |         .map(|v| v - nlz)
     |                      ^^^ expected `u32`, found `usize`

error[E0277]: cannot subtract `usize` from `u32`
    --> C:\Users\Marc\.cargo\registry\src\github.com-1ecc6299db9ec823\lexical-core-0.4.6\src\atof\algorithm\math.rs:1061:20
     |
1061 |         .map(|v| v - nlz)
     |                    ^ no implementation for `u32 - usize`
     |
     = help: the trait `Sub<usize>` is not implemented for `u32`

error[E0308]: mismatched types
    --> C:\Users\Marc\.cargo\registry\src\github.com-1ecc6299db9ec823\lexical-core-0.4.6\src\atof\algorithm\math.rs:1062:20
     |
1062 |         .unwrap_or(usize::max_value())
     |                    ^^^^^^^^^^^^^^^^^^ expected `u32`, found `usize`
     |
help: you can convert a `usize` to a `u32` and panic if the converted value doesn't fit
     |
1062 |         .unwrap_or(usize::max_value().try_into().unwrap())
     |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
    --> C:\Users\Marc\.cargo\registry\src\github.com-1ecc6299db9ec823\lexical-core-0.4.6\src\atof\algorithm\math.rs:1060:5
     |
1056 |   pub fn bit_length(x: &[Limb]) -> usize {
     |                                    ----- expected `usize` because of return type
...
1060 | /     Limb::BITS.checked_mul(x.len())
1061 | |         .map(|v| v - nlz)
1062 | |         .unwrap_or(usize::max_value())
     | |______________________________________^ expected `usize`, found `u32`
     |
help: you can convert a `u32` to a `usize` and panic if the converted value doesn't fit
     |
1060 |     Limb::BITS.checked_mul(x.len())
1061 |         .map(|v| v - nlz)
1062 |         .unwrap_or(usize::max_value()).try_into().unwrap()
     |

error[E0308]: mismatched types
    --> C:\Users\Marc\.cargo\registry\src\github.com-1ecc6299db9ec823\lexical-core-0.4.6\src\atof\algorithm\math.rs:1087:23
     |
1087 |     debug_assert!(n < bits && n != 0);
     |                       ^^^^ expected `usize`, found `u32`
     |
help: you can convert a `u32` to a `usize` and panic if the converted value doesn't fit
     |
1087 |     debug_assert!(n < bits.try_into().unwrap() && n != 0);
     |                       ^^^^^^^^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
    --> C:\Users\Marc\.cargo\registry\src\github.com-1ecc6299db9ec823\lexical-core-0.4.6\src\atof\algorithm\math.rs:1094:25
     |
1094 |     let lshift = bits - n;
     |                         ^ expected `u32`, found `usize`

error[E0277]: cannot subtract `usize` from `u32`
    --> C:\Users\Marc\.cargo\registry\src\github.com-1ecc6299db9ec823\lexical-core-0.4.6\src\atof\algorithm\math.rs:1094:23
     |
1094 |     let lshift = bits - n;
     |                       ^ no implementation for `u32 - usize`
     |
     = help: the trait `Sub<usize>` is not implemented for `u32`

error[E0308]: mismatched types
    --> C:\Users\Marc\.cargo\registry\src\github.com-1ecc6299db9ec823\lexical-core-0.4.6\src\atof\algorithm\math.rs:1135:19
     |
1135 |     let rem = n % bits;
     |                   ^^^^ expected `usize`, found `u32`

error[E0277]: cannot mod `usize` by `u32`
    --> C:\Users\Marc\.cargo\registry\src\github.com-1ecc6299db9ec823\lexical-core-0.4.6\src\atof\algorithm\math.rs:1135:17
     |
1135 |     let rem = n % bits;
     |                 ^ no implementation for `usize % u32`
     |
     = help: the trait `Rem<u32>` is not implemented for `usize`

error[E0308]: mismatched types
    --> C:\Users\Marc\.cargo\registry\src\github.com-1ecc6299db9ec823\lexical-core-0.4.6\src\atof\algorithm\math.rs:1136:19
     |
1136 |     let div = n / bits;
     |                   ^^^^ expected `usize`, found `u32`

error[E0277]: cannot divide `usize` by `u32`
    --> C:\Users\Marc\.cargo\registry\src\github.com-1ecc6299db9ec823\lexical-core-0.4.6\src\atof\algorithm\math.rs:1136:17
     |
1136 |     let div = n / bits;
     |                 ^ no implementation for `usize / u32`
     |
     = help: the trait `Div<u32>` is not implemented for `usize`

error[E0308]: mismatched types
    --> C:\Users\Marc\.cargo\registry\src\github.com-1ecc6299db9ec823\lexical-core-0.4.6\src\atof\algorithm\math.rs:1192:23
     |
1192 |     debug_assert!(n < bits);
     |                       ^^^^ expected `usize`, found `u32`
     |
help: you can convert a `u32` to a `usize` and panic if the converted value doesn't fit
     |
1192 |     debug_assert!(n < bits.try_into().unwrap());
     |                       ^^^^^^^^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
    --> C:\Users\Marc\.cargo\registry\src\github.com-1ecc6299db9ec823\lexical-core-0.4.6\src\atof\algorithm\math.rs:1202:25
     |
1202 |     let rshift = bits - n;
     |                         ^ expected `u32`, found `usize`

error[E0277]: cannot subtract `usize` from `u32`
    --> C:\Users\Marc\.cargo\registry\src\github.com-1ecc6299db9ec823\lexical-core-0.4.6\src\atof\algorithm\math.rs:1202:23
     |
1202 |     let rshift = bits - n;
     |                       ^ no implementation for `u32 - usize`
     |
     = help: the trait `Sub<usize>` is not implemented for `u32`

error[E0308]: mismatched types
    --> C:\Users\Marc\.cargo\registry\src\github.com-1ecc6299db9ec823\lexical-core-0.4.6\src\atof\algorithm\math.rs:1254:19
     |
1254 |     let rem = n % bits;
     |                   ^^^^ expected `usize`, found `u32`

error[E0277]: cannot mod `usize` by `u32`
    --> C:\Users\Marc\.cargo\registry\src\github.com-1ecc6299db9ec823\lexical-core-0.4.6\src\atof\algorithm\math.rs:1254:17
     |
1254 |     let rem = n % bits;
     |                 ^ no implementation for `usize % u32`
     |
     = help: the trait `Rem<u32>` is not implemented for `usize`

error[E0308]: mismatched types
    --> C:\Users\Marc\.cargo\registry\src\github.com-1ecc6299db9ec823\lexical-core-0.4.6\src\atof\algorithm\math.rs:1255:19
     |
1255 |     let div = n / bits;
     |                   ^^^^ expected `usize`, found `u32`

error[E0277]: cannot divide `usize` by `u32`
    --> C:\Users\Marc\.cargo\registry\src\github.com-1ecc6299db9ec823\lexical-core-0.4.6\src\atof\algorithm\math.rs:1255:17
     |
1255 |     let div = n / bits;
     |                 ^ no implementation for `usize / u32`
     |
     = help: the trait `Div<u32>` is not implemented for `usize`

error[E0308]: mismatched types
    --> C:\Users\Marc\.cargo\registry\src\github.com-1ecc6299db9ec823\lexical-core-0.4.6\src\atof\algorithm\math.rs:2066:27
     |
2066 |     let rs = Limb::BITS - s;
     |                           ^ expected `u32`, found `usize`

error[E0277]: cannot subtract `usize` from `u32`
    --> C:\Users\Marc\.cargo\registry\src\github.com-1ecc6299db9ec823\lexical-core-0.4.6\src\atof\algorithm\math.rs:2066:25
     |
2066 |     let rs = Limb::BITS - s;
     |                         ^ no implementation for `u32 - usize`
     |
     = help: the trait `Sub<usize>` is not implemented for `u32`

@tkonolige
Copy link
Owner

Looks like rust-lang/rust#81654 is the issue. I've bumped the dependencies which fixes the problem.

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

2 participants