We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When rebuilding with no change, cargo build shows its output in the original format, not the requested one
$ cargo new foo; cd foo $ cat <<EOF > src/main.rs fn main() { let a = 1; } EOF $ cargo build Compiling foo v0.1.0 (/tmp/testcase/foo) warning: unused variable: `a` --> foo/src/main.rs:2:9 | 2 | let a = 1; | ^ help: if this is intentional, prefix it with an underscore: `_a` | = note: `#[warn(unused_variables)]` on by default warning: `foo` (bin "foo") generated 1 warning (run `cargo fix --bin "foo"` to apply 1 suggestion) Finished dev [optimized + debuginfo] target(s) in 0.16s $ cargo build --message-format=short warning: unused variable: `a` --> foo/src/main.rs:2:9 | 2 | let a = 1; | ^ help: if this is intentional, prefix it with an underscore: `_a` | = note: `#[warn(unused_variables)]` on by default warning: `foo` (bin "foo") generated 1 warning (run `cargo fix --bin "foo"` to apply 1 suggestion) Finished dev [optimized + debuginfo] target(s) in 0.00s $ rm -rf target $ cargo build --message-format=short Compiling foo v0.1.0 (/tmp/testcase/foo) foo/src/main.rs:2:9: warning: unused variable: `a` warning: `foo` (bin "foo") generated 1 warning (run `cargo fix --bin "foo"` to apply 1 suggestion) Finished dev [optimized + debuginfo] target(s) in 0.16s $ cargo build foo/src/main.rs:2:9: warning: unused variable: `a` warning: `foo` (bin "foo") generated 1 warning (run `cargo fix --bin "foo"` to apply 1 suggestion) Finished dev [optimized + debuginfo] target(s) in 0.04s
in a similar manner that altering RUSTFLAGS makes cargo rebuild, a different value of --message-format should probably do so too.
No response
cargo 1.77.0-nightly (7bb7b5395 2024-01-20) release: 1.77.0-nightly commit-hash: 7bb7b539558dc88bea44cee4168b6269bf8177b0 commit-date: 2024-01-20 host: x86_64-unknown-linux-gnu libgit2: 1.7.1 (sys:0.18.1 vendored) libcurl: 8.5.0-DEV (sys:0.4.70+curl-8.5.0 vendored ssl:OpenSSL/1.1.1w) ssl: OpenSSL 1.1.1w 11 Sep 2023 os: Debian 12 (bookworm) [64-bit]
The text was updated successfully, but these errors were encountered:
Thanks for the report! I believe this is a duplicate of #9003, so closing in favor of that.
Sorry, something went wrong.
No branches or pull requests
Problem
When rebuilding with no change, cargo build shows its output in the original format, not the requested one
Steps
Possible Solution(s)
in a similar manner that altering RUSTFLAGS makes cargo rebuild, a different value of --message-format should probably do so too.
Notes
No response
Version
The text was updated successfully, but these errors were encountered: