the-lean-crate / cargo-diet

A cargo-companion to become a 'lean crate' (a member of The Lean Crate Initiative)
https://github.com/the-lean-crate/criner
MIT License
156 stars 3 forks source link

v1.1.2 doesn't compile with rust 1.42.0 #4

Closed bdejean closed 4 years ago

bdejean commented 4 years ago

Hello,

it seems that it requires at least rust 1.43.0 to get u64::MAX:

error[E0599]: no associated item named `MAX` found for type `u64` in the current scope
  --> /home/benoit/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-diet-1.1.2/src/bin/main.rs:47:37
   |
47 |             if b.get_bytes() > u64::MAX as u128 {
   |                                     ^^^ associated item not found in `u64`
   |
help: you are looking for the module in `std`, not the primitive type
   |
47 |             if b.get_bytes() > std::u64::MAX as u128 {
   |                                ^^^^^^^^^^^^^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0599`.
error: failed to compile `cargo-diet v1.1.2`, intermediate artifacts can be found at `/tmp/cargo-installHGPzif`

Caused by:
  could not compile `cargo-diet`.

To learn more, run the command again with --verbose.
Byron commented 4 years ago

Thank you! I have released v1.1.3 with the patch to compile on Rustc 1.42, hoping this is the only issue related to it, having not tested it locally nor on CI. This also means there is a potential for regression, but I rather live with that than forcing installation of a particular Rustc version in CI an increasing its runtimes. Thanks for your understanding.