rust-embedded / cargo-binutils

Cargo subcommands to invoke the LLVM tools shipped with the Rust toolchain
Apache License 2.0
474 stars 41 forks source link

`cargo nm` output includes compiler messages #111

Open spookyvision opened 2 years ago

spookyvision commented 2 years ago

expected: I only get nm output when redirecting/piping cargo nm standard output actual: rustc/cargo output is included as well:

❯ cargo nm | head -11
    Finished dev [unoptimized + debuginfo] target(s) in 0.00s
warning: unused variable: `unused`
  --> src/main.rs:17:9
   |
17 |     let unused = 4;
   |         ^^^^^^ help: if this is intentional, prefix it with an underscore: `_unused`
   |
   = note: `#[warn(unused_variables)]` on by default

warning: 1 warning emitted

0000000100031d88 s GCC_except_table0
Emilgardis commented 2 years ago

https://github.com/rust-embedded/cargo-binutils/blob/891939d3e7e7f973cca2ddd7793aef312f3dbd3e/src/lib.rs#L382