rustでcargo checkしたとき、詳細なwarningがでないとき
cargo checkで詳細なワーニングがでないとき
> cargo check Fresh bitonic-sorter v0.1.0 Finished dev [unoptimized + debuginfo] target(s) in 0.02s
一度、"cargo clean"してから、 "cargo check"に-vをつけると、詳細なワーニングが表示される。
- ”cargo clean"
- "cargo check -v"
> cargo clean > cargo check -v Checking bitonic-sorter v0.1.0 Running `rustc --edition=2018 --crate-name bitonic_sorter src\lib.rs --color always --crate-type lib --emit=dep-info,metadata -C debuginfo=2 -C metadata=1159761d94f87fac -C extra-filename=-1159761d94f87fac --out-dir OUTDIR -C incremental=INC_DIR -L dependency=DEP_DIR warning: unused variable: `x` --> src\first.rs:8:13 | 8 | pub fn sort(x: &mut [u32], up: bool) { | ^ help: consider prefixing with an underscore: `_x` | = note: `#[warn(unused_variables)]` on by default warning: unused variable: `up` --> src\first.rs:8:28 | 8 | pub fn sort(x: &mut [u32], up: bool) { | ^^ help: consider prefixing with an underscore: `_up` warning: unused variable: `x` --> src\first.rs:13:13 | 13 | fn sub_sort(x: &mut [u32], up: bool) { | ^ help: consider prefixing with an underscore: `_x` warning: unused variable: `up` --> src\first.rs:13:28 | 13 | fn sub_sort(x: &mut [u32], up: bool) { | ^^ help: consider prefixing with an underscore: `_up` warning: unused variable: `x` --> src\first.rs:18:21 | 18 | fn compare_and_swap(x: &mut [u32], up: bool) { | ^ help: consider prefixing with an underscore: `_x` warning: unused variable: `up` --> src\first.rs:18:36 | 18 | fn compare_and_swap(x: &mut [u32], up: bool) { | ^^ help: consider prefixing with an underscore: `_up` warning: function is never used: `sub_sort` --> src\first.rs:13:1 | 13 | fn sub_sort(x: &mut [u32], up: bool) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(dead_code)]` on by default warning: function is never used: `compare_and_swap` --> src\first.rs:18:1 | 18 | fn compare_and_swap(x: &mut [u32], up: bool) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Finished dev [unoptimized + debuginfo] target(s) in 0.55s