Repository: rust
Issue: Compiler panic on any cargo run/build
Labels: I-ICE,T-compiler,C-bug

<!--
Thank you for finding an Internal Compiler Error! 🧊  If possible, try to provide
a minimal verifiable example. You can read "Rust Bug Minimization Patterns" for
how to create smaller examples.

http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/

-->

### Code
https://github.com/aalouaoui/nannou-bezier-curves

### Meta
<!--
If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions.
-->

`rustc --version --verbose`:
```
rustc 1.56.1 (59eed8a2a 2021-11-01)
binary: rustc
commit-hash: 59eed8a2aac0230a8b53e89d4e99d55912ba6b35
commit-date: 2021-11-01
host: x86_64-unknown-linux-gnu
release: 1.56.1
LLVM version: 13.0.0
```

### Error output

```
thread 'rustc' panicked at 'assertion failed: `(left == right)`
  left: `crate25`,
 right: `crate20`', compiler/rustc_metadata/src/rmeta/encoder.rs:1724:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.56.1 (59eed8a2a 2021-11-01) running on x86_64-unknown-linux-gnu

note: compiler flags: -C opt-level=3 -C embed-bitcode=no --crate-type lib

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack
error: could not compile `gpu-descriptor`
warning: build failed, waiting for other jobs to finish...
error: build failed
```

<!--
Include a backtrace in the code block by setting `RUST_BACKTRACE=1` in your
environment. E.g. `RUST_BACKTRACE=1 cargo run --release`.
-->
<details><summary><strong>Backtrace</strong></summary>
<p>

```
error[E0463]: can't find crate for `num_traits` which `rusttype` depends on
  --> /home/khalid/.cargo/registry/src/github.com-1ecc6299db9ec823/rusttype-0.7.9/src/lib.rs:91:9
   |
91 | pub use rusttype_next::*;
   |         ^^^^^^^^^^^^^ can't find crate

For more information about this error, try `rustc --explain E0463`.
error: could not compile `rusttype` due to previous error
warning: build failed, waiting for other jobs to finish...
thread 'rustc' panicked at 'assertion failed: `(left == right)`
  left: `crate23`,
 right: `crate22`', compiler/rustc_metadata/src/rmeta/encoder.rs:1724:17
stack backtrace:
   0: rust_begin_unwind
             at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/panicking.rs:517:5
   1: core::panicking::panic_fmt
             at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/panicking.rs:101:14
   2: core::panicking::assert_failed_inner
   3: core::panicking::assert_failed
   4: rustc_metadata::rmeta::encoder::EncodeContext::encode_crate_root
   5: rustc_metadata::rmeta::encoder::encode_metadata_impl
   6: rustc_data_structures::sync::join
   7: rustc_metadata::rmeta::decoder::cstore_impl::<impl rustc_middle::middle::cstore::CrateStore for rustc_metadata::creader::CStore>::encode_metadata
   8: rustc_middle::ty::context::TyCtxt::encode_metadata
   9: rustc_interface::queries::Queries::ongoing_codegen
  10: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
  11: rustc_span::with_source_map
  12: scoped_tls::ScopedKey<T>::set
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.56.1 (59eed8a2a 2021-11-01) running on x86_64-unknown-linux-gnu

note: compiler flags: -C opt-level=3 -C embed-bitcode=no --crate-type lib

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack
error: build failed
```

</p>
</details>

### System Info

```
OS: Arch Linux x86_64
Kernel: 5.15.2-arch1-1
CPU: Intel i5-6200U (4) @ 2.800GHz
GPU: Intel Skylake GT2 [HD Graphics 520]
Memory: 12GB
```