xd009642 / llvm-profparser

Mostly complete pure rust implementation of parsing llvm instrumentation profile data
Apache License 2.0
13 stars 9 forks source link

Fails to build on i386 and armv7: the trait bound `u64: ToUsize` is not satisfied #25

Closed yurivict closed 1 year ago

yurivict commented 1 year ago
error[E0277]: the trait bound `u64: ToUsize` is not satisfied
   --> /wrkdirs/usr/ports/devel/tarpaulin/work/tarpaulin-0.23.1/cargo-crates/llvm_profparser-0.3.0/src/instrumentation_profile/raw_profile.rs:308:35
    |
308 |             let (bytes, _) = take(header.padding_bytes_before_counters)(input)?;
    |                              ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `ToUsize` is not implemented for `u64`
    |                              |
    |                              required by a bound introduced by this call
    |
    = help: the following other types implement trait `ToUsize`:
              u16
              u32
              u8
              usize
note: required by a bound in `nom::bytes::complete::take`
   --> /wrkdirs/usr/ports/devel/tarpaulin/work/tarpaulin-0.23.1/cargo-crates/nom-7.1.1/src/bytes/complete.rs:408:6
    |
408 |   C: ToUsize,
    |      ^^^^^^^ required by this bound in `nom::bytes::complete::take`

For more information about this error, try `rustc --explain E0277`.
error: could not compile `llvm_profparser` due to previous error

rust-1.66.1 FreeBSD 13.1

xd009642 commented 1 year ago

I've just fixed this in latest master, will release a new version shortly