のねのBlog

パソコンの問題や、ソフトウェアの開発で起きた問題など書いていきます。よろしくお願いします^^。

2019-11-21から1日間の記事一覧

rustのワーニング help: consider prefixing with an underscore:

fn main() { let n1 = 10_000; let n2 = 0u8; let n3 = -100_isize; let n4 = 10; let n5 = n3 + n4; } help: consider prefixing with an underscore: _n1 のワーニングがでる。 PS > cargo run --example "ch04_03_integer" warning: file found to be pre…

exampleの実行 "cargo run --example"

cargo run --example "ch04_02_bool" で、直接実行できた。 PS > cargo run --example "ch04_02_bool" warning: file found to be present in multiple build targets: \examples\ch04_01_units.rs Compiling ex04 v0.1.0 (rust_project\rustbook\ch04\ex04)…

error: a bin target must be available for `cargo run`

error: a bin target must be available for cargo run [package] 略 [dependencies] 以下のように、binを”Cargo.toml"に追加した。 [package] 略 [dependencies] [[bin]] name = "main1" path = "examples/ch04_01_units.rs" qiita.com