iliekturtles / uom

Units of measurement -- type-safe zero-cost dimensional analysis

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error[E0277]: the trait bound `<<D as si::Dimension>::L as std::ops::Neg>::Output: Integer` is not satisfied

Martinfx opened this issue · comments

commented

Hi,
i have issue in with your packages on FreeBSD 13.1, rustc 1.63.0

compile_rust_libredeferender.TXT

     |


   --> code/FreeBSD-Ports/libredefender/work/libredefender-0.6.0/cargo-crates/uom-0.21.1/src/system.rs:716:18
    |
716 |               ) -> Quantity<$quantities<$($crate::typenum::Negate<D::$symbol>),+>, U, V>
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Integer` is not implemented for `<<D as si::Dimension>::L as std::ops::Neg>::Output`
    |
   ::: code/FreeBSD-Ports/libredefender/work/libredefender-0.6.0/cargo-crates/uom-0.21.1/src/si/mod.rs:10:1
    |
10  | / system! {
11  | |     /// [International System of Quantities](http://jcgm.bipm.org/vim/en/1.6.html) (ISQ).
12  | |     quantities: ISQ {
13  | |         length: meter, L;
...   |
55  | |     }
56  | | }
    | |_- in this macro invocation
    |
note: required by a bound in `si::Quantity`
   --> code/FreeBSD-Ports/libredefender/work/libredefender-0.6.0/cargo-crates/uom-0.21.1/src/system.rs:232:16
    |
230 |           pub struct Quantity<D, U, V>
    |                      -------- required by a bound in this
231 |           where
232 |               D: Dimension + ?Sized,
    |                  ^^^^^^^^^ required by this bound in `si::Quantity`
    |
   ::: code/FreeBSD-Ports/libredefender/work/libredefender-0.6.0/cargo-crates/uom-0.21.1/src/si/mod.rs:10:1
    |
10  | / system! {
11  | |     /// [International System of Quantities](http://jcgm.bipm.org/vim/en/1.6.html) (ISQ).
12  | |     quantities: ISQ {
13  | |         length: meter, L;
...   |
55  | |     }
56  | | }
    | |_- in this macro invocation
    = note: this error originates in the macro `system` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `<<D as si::Dimension>::M as std::ops::Neg>::Output: Integer` is not satisfied
   --> code/FreeBSD-Ports/libredefender/work/libredefender-0.6.0/cargo-crates/uom-0.21.1/src/system.rs:716:18
    |
716 |               ) -> Quantity<$quantities<$($crate::typenum::Negate<D::$symbol>),+>, U, V>
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Integer` is not implemented for `<<D as si::Dimension>::M as std::ops::Neg>::Output`
    |
   ::: code/FreeBSD-Ports/libredefender/work/libredefender-0.6.0/cargo-crates/uom-0.21.1/src/si/mod.rs:10:1
    |
10  | / system! {
11  | |     /// [International System of Quantities](http://jcgm.bipm.org/vim/en/1.6.html) (ISQ).
12  | |     quantities: ISQ {
13  | |         length: meter, L;
...   |
55  | |     }
56  | | }



Same problem here with rustc 1.64.0 on Ubuntu 22.04

The issue is that uom v0.21.1 is being used. rustc broke compatibility in 1.49.0. A fix is introduced in uom v0.30.0. See #210 for the full discussion.

Looking at your build log I see that the cargo update downgrades from v0.30.0 to v0.21.1 for some reason. Using v0.30.0 or later will fix the issue.