私はRustのプロジェクトでクレート「num」を使用しようとしています(私はこの言語の初心者です)ので、私のCargo.tomlは次のようになりました:
[package]
name = "hello_world"
version = "0.0.1"
authors = [ "Vini" ]
[dependencies]
time = "*"
num = "*"
しかし、私が実行すると:
cargo run
次のコンパイル エラーが発生します。
/.cargo/registry/src/github.com-0a35038f75765ae4/num-0.0.6/src/bigint.rs:66:16: 66:19 error: expected identifier, found keyword `mod`
/.cargo/registry/src/github.com-0a35038f75765ae4/num-0.0.6/src/bigint.rs:66 use std::str::{mod, FromStr};
^~~
/.cargo/registry/src/github.com-0a35038f75765ae4/num-0.0.6/src/bigint.rs:80:27: 80:28 error: expected one of `(`, `+`, `::`, `;`, `<`, or `]`, found `,`
/.cargo/registry/src/github.com-0a35038f75765ae4/num-0.0.6/src/bigint.rs:80 static ZERO_VEC: [BigDigit, ..1] = [ZERO_BIG_DIGIT];
^
Could not compile `num`.
これが実際に何を意味するのかわかりません。カーゴの使い方が間違っていますか? このバージョンの 'num' は cargo と互換性がありませんか?
私は貨物バージョンを持っています:
cargo 0.4.0-nightly (15b497b 2015-07-08) (built 2015-07-10)
そしてさびコンパイラ:
rustc 1.2.0 (082e47636 2015-08-03)