Compilation error
varnav opened this issue · comments
Fails to compile as a step of compilation of main.ton.dev
Compiling ton_sdk v0.1.0 (https://github.com/tonlabs/TON-SDK.git#4f27347c)
error[E0599]: no associated item named `MAX` found for type `u64` in the current scope
--> /home/ton/.cargo/git/checkouts/ton-sdk-11823a0ea1fdf592/4f27347/ton_sdk/src/transaction.rs:237:53
|
237 | fees.total_output = if total_output <= u64::MAX as u128 { total_output as u64 } else { 0 };
| ^^^ associated item not found in `u64`
|
= help: items from traits can only be used if the trait is in scope
= note: the following trait is implemented but not in scope; perhaps add a `use` for it:
`use rand::distributions::weighted::alias_method::Weight;`
help: you are looking for the module in `std`, not the primitive type
|
237 | fees.total_output = if total_output <= std::u64::MAX as u128 { total_output as u64 } else { 0 };
| ^^^^^^^^^^^^^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0599`.
error: could not compile `ton_sdk`.
warning: build failed, waiting for other jobs to finish...
error: build failed
Yep
I'm getting the same error on Ubuntu 18
4111da2#diff-80c14c27d562f2c591cb45c27998dac5 Here the problem @AlexeyVavilin