]> git.proxmox.com Git - cargo.git/commit
Auto merge of #9675 - ehuss:diagnostic-dedupe, r=alexcrichton
authorbors <bors@rust-lang.org>
Fri, 16 Jul 2021 15:22:58 +0000 (15:22 +0000)
committerbors <bors@rust-lang.org>
Fri, 16 Jul 2021 15:22:58 +0000 (15:22 +0000)
commit54bc19ee56c2251fc749198cce9605450fecd1df
tree4604ada82e8ec0960bd47069052d5c7664922541
parent2b4c8d91be90788dbdc5733c394f18a013eb2657
parent5606d1b540152a2a5a89d5745ac78d9b7361cdfe
Auto merge of #9675 - ehuss:diagnostic-dedupe, r=alexcrichton

Deduplicate compiler diagnostics.

This adds some logic to deduplicate diagnostics emitted across rustc invocations. There are some situations where different targets can emit the same message, and that has caused confusion particularly for new users. A prominent example is running `cargo test` which will build the library twice concurrently (once as a normal library, and once as a test).

As part of this, the "N warnings emitted" message sent by rustc is intercepted, and instead cargo generates its own summary. This is to prevent potentially confusing situations where that message is either deduplicated, or wrong. It also provides a little more context to explain exactly *what* issued the warnings.  Example:

```warning: `foo` (lib) generated 1 warning```

This only impacts human-readable output, it does not change JSON behavior.

Closes #9104