-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
A-rebuild-detectionArea: rebuild detection and fingerprintingArea: rebuild detection and fingerprintingC-bugCategory: bugCategory: bugCommand-check
Description
$ cargo new --bin mybin && cd mybin && sed -i '1ifn foo(){}' src/main.rs && cargo check && cargo check
:
Created binary (application) `mybin` project
Compiling mybin v0.1.0 (file:///tmp/mybin)
warning: function is never used: `foo`, #[warn(dead_code)] on by default
--> src/main.rs:1:1
|
1 | fn foo(){}
| ^^^^^^^^^^
Finished dev [unoptimized + debuginfo] target(s) in 0.47 secs
Compiling mybin v0.1.0 (file:///tmp/mybin)
warning: function is never used: `foo`, #[warn(dead_code)] on by default
--> src/main.rs:1:1
|
1 | fn foo(){}
| ^^^^^^^^^^
Finished dev [unoptimized + debuginfo] target(s) in 0.50 secs
$ cargo new --lib mylib && cd mylib && sed -i '1ifn foo(){}' src/lib.rs && cargo check && cargo check
:
Created library `mylib` project
Compiling mylib v0.1.0 (file:///tmp/mylib)
warning: function is never used: `foo`, #[warn(dead_code)] on by default
--> src/lib.rs:1:1
|
1 | fn foo(){}
| ^^^^^^^^^^
Finished dev [unoptimized + debuginfo] target(s) in 0.20 secs
Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
Which one is the intended behavior for cargo-check
? I personally believe it is useful to reissue warnings. The user might accidentally close or clear the terminal, and might want to get the warnings back without modifying the code.
BatmanAoD, MatthieuBizien, drrlvn, ricvelozo, bcmills and 3 more
Metadata
Metadata
Assignees
Labels
A-rebuild-detectionArea: rebuild detection and fingerprintingArea: rebuild detection and fingerprintingC-bugCategory: bugCategory: bugCommand-check