Repository: rust
Issue: Error E0514 (found crate compiled by an incompatible version of rustc) should stop other diagnostics
Labels: A-diagnostics,T-compiler

> I'm not sure what category this should really come under.

While working on some code after updating cargo, I happened to run `cargo clippy`, which made the following **752** errors come, which hadn't appeared with `cargo r`.

<details><summary>Details</summary>

```
    Checking time v0.3.10
    Checking futures-util v0.3.21
    Checking stretch v0.3.2
    Checking plotters v0.3.1
    Checking miniserde v0.1.24
error[E0514]: found crate `lazy_static` compiled by an incompatible version of rustc
 --> C:\Users\_\.cargo\registry\src\github.com-1ecc6299db9ec823\stretch-0.3.2\src\lib.rs:7:1
  |
7 | extern crate lazy_static;
  | ^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = help: please recompile that crate using this compiler (rustc 1.63.0-nightly (99930ac7f 2022-06-11)) (consider running `cargo clean` first)
  = note: the following crate versions were found:
          crate `lazy_static` compiled by rustc 1.63.0-nightly (c52b9c10b 2022-05-16): \\?\C:\Users\_\Documents\git\os-util\target\debug\deps\liblazy_static-77db95cc6b087085.rmeta

error[E0514]: found crate `itoa` compiled by an incompatible version of rustc
  --> C:\Users\_\.cargo\registry\src\github.com-1ecc6299db9ec823\miniserde-0.1.24\src\json\ser.rs:60:46
   |
60 |             Fragment::U64(n) => out.push_str(itoa::Buffer::new().format(n)),
   |                                              ^^^^
   |
   = help: please recompile that crate using this compiler (rustc 1.63.0-nightly (99930ac7f 2022-06-11)) (consider running `cargo clean` first)
   = note: the following crate versions were found:
           crate `itoa` compiled by rustc 1.63.0-nightly (c52b9c10b 2022-05-16): \\?\C:\Users\_\Documents\git\os-util\target\debug\deps\libitoa-e72307be24aab589.rmeta

[... 752 errors!!!]

error[E0284]: type annotations needed: cannot satisfy `<St as Stream>::Item == _`
   --> C:\Users\_\.cargo\registry\src\github.com-1ecc6299db9ec823\futures-util-0.3.21\src\lib.rs:104:9
    |
104 |           fn size_hint(&self) -> (usize, Option<usize>) {
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot satisfy `<St as Stream>::Item == _`
    |
   ::: C:\Users\_\.cargo\registry\src\github.com-1ecc6299db9ec823\futures-util-0.3.21\src\stream\stream\mod.rs:211:1
    |
211 | / delegate_all!(
212 | |     /// Stream for the [`flat_map_unordered`](StreamExt::flat_map_unordered) method.
213 | |     FlatMapUnordered<St, U, F>(
214 | |         FlattenUnordered<Map<St, F>>
215 | |     ): Debug + Sink + Stream + FusedStream + AccessInner[St, (. .)] + New[|x: St,...
216 | |     where St: Stream, U: Stream, U: Unpin, F: FnMut(St::Item) -> U
217 | | );
    | |_- in this macro invocation
    |
    = note: this error originates in the macro `delegate_stream` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0284]: type annotations needed: cannot satisfy `<St as Stream>::Item == <St as Stream>::Item`
   --> C:\Users\_\.cargo\registry\src\github.com-1ecc6299db9ec823\futures-util-0.3.21\src\lib.rs:104:12
    |
104 |           fn size_hint(&self) -> (usize, Option<usize>) {
    |              ^^^^^^^^^ cannot satisfy `<St as Stream>::Item == <St as Stream>::Item`
    |
   ::: C:\Users\_\.cargo\registry\src\github.com-1ecc6299db9ec823\futures-util-0.3.21\src\stream\stream\mod.rs:211:1
    |
211 | / delegate_all!(
212 | |     /// Stream for the [`flat_map_unordered`](StreamExt::flat_map_unordered) method.
213 | |     FlatMapUnordered<St, U, F>(
214 | |         FlattenUnordered<Map<St, F>>
215 | |     ): Debug + Sink + Stream + FusedStream + AccessInner[St, (. .)] + New[|x: St,...
216 | |     where St: Stream, U: Stream, U: Unpin, F: FnMut(St::Item) -> U
217 | | );
    | |_- in this macro invocation
    |
    = note: this error originates in the macro `delegate_stream` (in Nightly builds, run with -Z macro-backtrace for more info)

Some errors have detailed explanations: E0283, E0284, E0309, E0392, E0412, E0422, E0432, E0433.
For more information about an error, try `rustc --explain E0283`.
error: could not compile `futures-util` due to 752 previous errors
```

</details>

Ideally the output should only include E0514 *once* for each incompatible crate, and suppress any other errors that arise, making it a full 100x less output (only 7 errors):

<details><summary>Details</summary>

```
    Checking time v0.3.10
    Checking futures-util v0.3.21
    Checking stretch v0.3.2
    Checking plotters v0.3.1
    Checking miniserde v0.1.24
error[E0514]: found crate `lazy_static` compiled by an incompatible version of rustc
 --> C:\Users\_\.cargo\registry\src\github.com-1ecc6299db9ec823\stretch-0.3.2\src\lib.rs:7:1
  |
7 | extern crate lazy_static;
  | ^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = help: please recompile that crate using this compiler (rustc 1.63.0-nightly (99930ac7f 2022-06-11)) (consider running `cargo clean` first)
  = note: the following crate versions were found:
          crate `lazy_static` compiled by rustc 1.63.0-nightly (c52b9c10b 2022-05-16): \\?\C:\Users\_\Documents\git\os-util\target\debug\deps\liblazy_static-77db95cc6b087085.rmeta

[... only seven actual deduplicated errors:
    `lazy_static`
    `itoa`
    `ryu`
    `plotters_backend`
    `pin_utils`
    `slab`
    `pin_project_lite`]

error: could not compile `futures-util` due to 7 previous errors
```

</details>