我正在使用watch
with cargo
,以便快速查看编译时错误。但是,cargo build
只会在第一次构建时显示错误。
$ cargo build
Compiling clayman v0.0.1
src/core_math/vector.rs:8:5: 13:6 warning: method is never used: `New`, #[warn(dead_code)] on by default
src/core_math/vector.rs:8 pub fn New(x: i32, y: i32) -> Vector {
src/core_math/vector.rs:9 Vector {
src/core_math/vector.rs:10 x: x,
src/core_math/vector.rs:11 y: y
src/core_math/vector.rs:12 }
src/core_math/vector.rs:13 }
src/core_math/vector.rs:8:5: 13:6 warning: method `New` should have a snake case name such as `new`, #[warn(non_snake_case)] on by default
src/core_math/vector.rs:8 pub fn New(x: i32, y: i32) -> Vector {
src/core_math/vector.rs:9 Vector {
src/core_math/vector.rs:10 x: x,
src/core_math/vector.rs:11 y: y
src/core_math/vector.rs:12 }
src/core_math/vector.rs:13 }
src/main.rs:28:9: 28:10 warning: unused variable: `v`, #[warn(unused_variables)] on by default
src/main.rs:28 let v: vector::Vector;
^
$ cargo build
$
这意味着我只能在几秒钟内看到警告,然后才能watch
给我一个清晰的屏幕。
有没有办法cargo build
让我总是给我警告?