Repository: rust
Issue: ICE: failed to resolve instance in static-la v0.2.5
Labels: I-ICE,T-compiler,C-bug,A-const-generics,E-needs-mcve,F-generic_const_exprs,requires-incomplete-features

### Code

`cargo build --tests` in [static-la v0.2.5](https://crates.io/crates/static-la/0.2.5)

### Meta
`rustc --version --verbose`:
```
rustc 1.69.0-nightly (065852def 2023-02-13)
binary: rustc
commit-hash: 065852def0903296da33a9eaf557f230bcf3a61a
commit-date: 2023-02-13
host: x86_64-unknown-linux-gnu
release: 1.69.0-nightly
LLVM version: 15.0.7
```

### Error output

```
error: internal compiler error: compiler/rustc_middle/src/ty/instance.rs:397:18: failed to resolve instance for <MatrixSxS<&i32, [const expr], [const expr]> as From<[[&i32; 2]; 1]>>::from
```

<details><summary><strong>Backtrace</strong></summary>
<p>

```
error: internal compiler error: compiler/rustc_middle/src/ty/instance.rs:397:18: failed to resolve instance for <MatrixSxS<&i32, [const expr], [const expr]> as From<[[&i32; 2]; 1]>>::from

thread 'rustc' panicked at 'Box<dyn Any>', /rustc/065852def0903296da33a9eaf557f230bcf3a61a/compiler/rustc_errors/src/lib.rs:1645:9
stack backtrace:
   0:     0x7f753636a9ea - std::backtrace_rs::backtrace::libunwind::trace::ha39be26a07fb8052
                               at /rustc/065852def0903296da33a9eaf557f230bcf3a61a/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f753636a9ea - std::backtrace_rs::backtrace::trace_unsynchronized::hd6e5588684dfc770
                               at /rustc/065852def0903296da33a9eaf557f230bcf3a61a/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f753636a9ea - std::sys_common::backtrace::_print_fmt::h0aa1f720c61d57cb
                               at /rustc/065852def0903296da33a9eaf557f230bcf3a61a/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7f753636a9ea - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hc190949f222eb440
                               at /rustc/065852def0903296da33a9eaf557f230bcf3a61a/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f75363caafe - core::fmt::write::haec7e4ab73364fe1
                               at /rustc/065852def0903296da33a9eaf557f230bcf3a61a/library/core/src/fmt/mod.rs:1232:17
   5:     0x7f753635b005 - std::io::Write::write_fmt::hb6e3f525620bf821
                               at /rustc/065852def0903296da33a9eaf557f230bcf3a61a/library/std/src/io/mod.rs:1684:15
   6:     0x7f753636a7b5 - std::sys_common::backtrace::_print::h2247195b4ea8ad8f
                               at /rustc/065852def0903296da33a9eaf557f230bcf3a61a/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x7f753636a7b5 - std::sys_common::backtrace::print::h3d9da3a3c1b6d7ec
                               at /rustc/065852def0903296da33a9eaf557f230bcf3a61a/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x7f753636d54f - std::panicking::default_hook::{{closure}}::ha4d8e3c4db028445
                               at /rustc/065852def0903296da33a9eaf557f230bcf3a61a/library/std/src/panicking.rs:267:22
   9:     0x7f753636d28b - std::panicking::default_hook::h20fc8e669161563d
                               at /rustc/065852def0903296da33a9eaf557f230bcf3a61a/library/std/src/panicking.rs:286:9
  10:     0x7f75396c9eb4 - <rustc_driver_impl[dde0176af8c5ab09]::DEFAULT_HOOK::{closure#0}::{closure#0} as core[745cf9d9cd8fbdae]::ops::function::FnOnce<(&core[745cf9d9cd8fbdae]::panic::panic_info::PanicInfo,)>>::call_once::{shim:vtable#0}
  11:     0x7f753636dd8a - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h9f47dbc14e762fb4
                               at /rustc/065852def0903296da33a9eaf557f230bcf3a61a/library/alloc/src/boxed.rs:2002:9
  12:     0x7f753636dd8a - std::panicking::rust_panic_with_hook::h6018fd309f9d5b5b
                               at /rustc/065852def0903296da33a9eaf557f230bcf3a61a/library/std/src/panicking.rs:692:13
  13:     0x7f7539c381b1 - std[1c96249000aa551b]::panicking::begin_panic::<rustc_errors[22208327c08e6a91]::ExplicitBug>::{closure#0}
  14:     0x7f7539c35056 - std[1c96249000aa551b]::sys_common::backtrace::__rust_end_short_backtrace::<std[1c96249000aa551b]::panicking::begin_panic<rustc_errors[22208327c08e6a91]::ExplicitBug>::{closure#0}, !>
  15:     0x7f7539bcee66 - std[1c96249000aa551b]::panicking::begin_panic::<rustc_errors[22208327c08e6a91]::ExplicitBug>
  16:     0x7f7539c69416 - std[1c96249000aa551b]::panic::panic_any::<rustc_errors[22208327c08e6a91]::ExplicitBug>
  17:     0x7f7539c66a16 - <rustc_errors[22208327c08e6a91]::HandlerInner>::bug::<&alloc[79aef4a512136c7f]::string::String>
  18:     0x7f7539c666d0 - <rustc_errors[22208327c08e6a91]::Handler>::bug::<&alloc[79aef4a512136c7f]::string::String>
  19:     0x7f7539c88d2b - rustc_middle[f96e42c1fea88f4c]::util::bug::opt_span_bug_fmt::<rustc_span[5815ad9c631c3526]::span_encoding::Span>::{closure#0}
  20:     0x7f7539c8800a - rustc_middle[f96e42c1fea88f4c]::ty::context::tls::with_opt::<rustc_middle[f96e42c1fea88f4c]::util::bug::opt_span_bug_fmt<rustc_span[5815ad9c631c3526]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  21:     0x7f7539c87fd6 - rustc_middle[f96e42c1fea88f4c]::ty::context::tls::with_context_opt::<rustc_middle[f96e42c1fea88f4c]::ty::context::tls::with_opt<rustc_middle[f96e42c1fea88f4c]::util::bug::opt_span_bug_fmt<rustc_span[5815ad9c631c3526]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  22:     0x7f7539c88c76 - rustc_middle[f96e42c1fea88f4c]::util::bug::opt_span_bug_fmt::<rustc_span[5815ad9c631c3526]::span_encoding::Span>
  23:     0x7f7537a067d3 - rustc_middle[f96e42c1fea88f4c]::util::bug::bug_fmt
  24:     0x7f7538611bca - rustc_monomorphize[d10633cb9e211b20]::collector::collect_neighbours
  25:     0x7f7538606aa8 - rustc_monomorphize[d10633cb9e211b20]::collector::collect_items_rec
  26:     0x7f7538606f58 - rustc_monomorphize[d10633cb9e211b20]::collector::collect_items_rec
  27:     0x7f7538606f58 - rustc_monomorphize[d10633cb9e211b20]::collector::collect_items_rec
  28:     0x7f7538606f58 - rustc_monomorphize[d10633cb9e211b20]::collector::collect_items_rec
  29:     0x7f7538ba478b - <rustc_session[93261570977692f7]::session::Session>::time::<(), rustc_monomorphize[d10633cb9e211b20]::collector::collect_crate_mono_items::{closure#1}>
  30:     0x7f7538ba4144 - rustc_monomorphize[d10633cb9e211b20]::collector::collect_crate_mono_items
  31:     0x7f7538ba2a03 - rustc_monomorphize[d10633cb9e211b20]::partitioning::collect_and_partition_mono_items
  32:     0x7f7538e7522d - <rustc_query_system[a9229c40b17365dc]::dep_graph::graph::DepGraph<rustc_middle[f96e42c1fea88f4c]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[f96e42c1fea88f4c]::ty::context::TyCtxt, (), (&rustc_data_structures[8964f5c01932b752]::unord::UnordSet<rustc_span[5815ad9c631c3526]::def_id::DefId>, &[rustc_middle[f96e42c1fea88f4c]::mir::mono::CodegenUnit])>
  33:     0x7f7538e74b7c - rustc_query_system[a9229c40b17365dc]::query::plumbing::try_execute_query::<rustc_query_impl[69c85adeef6e905a]::queries::collect_and_partition_mono_items, rustc_query_impl[69c85adeef6e905a]::plumbing::QueryCtxt>
  34:     0x7f7539058632 - <rustc_query_impl[69c85adeef6e905a]::Queries as rustc_middle[f96e42c1fea88f4c]::ty::query::QueryEngine>::collect_and_partition_mono_items
  35:     0x7f7538c9c033 - rustc_codegen_ssa[8a75a20a7bf00863]::base::codegen_crate::<rustc_codegen_llvm[9f413023e6038ae5]::LlvmCodegenBackend>
  36:     0x7f7538c9bdfe - <rustc_codegen_llvm[9f413023e6038ae5]::LlvmCodegenBackend as rustc_codegen_ssa[8a75a20a7bf00863]::traits::backend::CodegenBackend>::codegen_crate
  37:     0x7f75388ff261 - <rustc_session[93261570977692f7]::session::Session>::time::<alloc[79aef4a512136c7f]::boxed::Box<dyn core[745cf9d9cd8fbdae]::any::Any>, rustc_interface[ca9b18c665a84cba]::passes::start_codegen::{closure#0}>
  38:     0x7f75388fed89 - rustc_interface[ca9b18c665a84cba]::passes::start_codegen
  39:     0x7f75388fac18 - <rustc_middle[f96e42c1fea88f4c]::ty::context::GlobalCtxt>::enter::<<rustc_interface[ca9b18c665a84cba]::queries::Queries>::ongoing_codegen::{closure#0}::{closure#0}, core[745cf9d9cd8fbdae]::result::Result<alloc[79aef4a512136c7f]::boxed::Box<dyn core[745cf9d9cd8fbdae]::any::Any>, rustc_errors[22208327c08e6a91]::ErrorGuaranteed>>
  40:     0x7f75388f8c64 - <rustc_interface[ca9b18c665a84cba]::queries::Queries>::ongoing_codegen
  41:     0x7f75388f830c - <rustc_interface[ca9b18c665a84cba]::interface::Compiler>::enter::<rustc_driver_impl[dde0176af8c5ab09]::run_compiler::{closure#1}::{closure#2}, core[745cf9d9cd8fbdae]::result::Result<core[745cf9d9cd8fbdae]::option::Option<rustc_interface[ca9b18c665a84cba]::queries::Linker>, rustc_errors[22208327c08e6a91]::ErrorGuaranteed>>
  42:     0x7f75388f3454 - rustc_span[5815ad9c631c3526]::with_source_map::<core[745cf9d9cd8fbdae]::result::Result<(), rustc_errors[22208327c08e6a91]::ErrorGuaranteed>, rustc_interface[ca9b18c665a84cba]::interface::run_compiler<core[745cf9d9cd8fbdae]::result::Result<(), rustc_errors[22208327c08e6a91]::ErrorGuaranteed>, rustc_driver_impl[dde0176af8c5ab09]::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  43:     0x7f75388f2f64 - <scoped_tls[bc57a32744e3362]::ScopedKey<rustc_span[5815ad9c631c3526]::SessionGlobals>>::set::<rustc_interface[ca9b18c665a84cba]::interface::run_compiler<core[745cf9d9cd8fbdae]::result::Result<(), rustc_errors[22208327c08e6a91]::ErrorGuaranteed>, rustc_driver_impl[dde0176af8c5ab09]::run_compiler::{closure#1}>::{closure#0}, core[745cf9d9cd8fbdae]::result::Result<(), rustc_errors[22208327c08e6a91]::ErrorGuaranteed>>
  44:     0x7f75388f2662 - std[1c96249000aa551b]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[ca9b18c665a84cba]::util::run_in_thread_pool_with_globals<rustc_interface[ca9b18c665a84cba]::interface::run_compiler<core[745cf9d9cd8fbdae]::result::Result<(), rustc_errors[22208327c08e6a91]::ErrorGuaranteed>, rustc_driver_impl[dde0176af8c5ab09]::run_compiler::{closure#1}>::{closure#0}, core[745cf9d9cd8fbdae]::result::Result<(), rustc_errors[22208327c08e6a91]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[745cf9d9cd8fbdae]::result::Result<(), rustc_errors[22208327c08e6a91]::ErrorGuaranteed>>
  45:     0x7f7538f6518c - <<std[1c96249000aa551b]::thread::Builder>::spawn_unchecked_<rustc_interface[ca9b18c665a84cba]::util::run_in_thread_pool_with_globals<rustc_interface[ca9b18c665a84cba]::interface::run_compiler<core[745cf9d9cd8fbdae]::result::Result<(), rustc_errors[22208327c08e6a91]::ErrorGuaranteed>, rustc_driver_impl[dde0176af8c5ab09]::run_compiler::{closure#1}>::{closure#0}, core[745cf9d9cd8fbdae]::result::Result<(), rustc_errors[22208327c08e6a91]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[745cf9d9cd8fbdae]::result::Result<(), rustc_errors[22208327c08e6a91]::ErrorGuaranteed>>::{closure#1} as core[745cf9d9cd8fbdae]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  46:     0x7f7536377d23 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hd8b371047d72378a
                               at /rustc/065852def0903296da33a9eaf557f230bcf3a61a/library/alloc/src/boxed.rs:1988:9
  47:     0x7f7536377d23 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h43857df79cf6223f
                               at /rustc/065852def0903296da33a9eaf557f230bcf3a61a/library/alloc/src/boxed.rs:1988:9
  48:     0x7f7536377d23 - std::sys::unix::thread::Thread::new::thread_start::h405fa19d08d79454
                               at /rustc/065852def0903296da33a9eaf557f230bcf3a61a/library/std/src/sys/unix/thread.rs:108:17
  49:     0x7f7536107bb5 - <unknown>
  50:     0x7f7536189d90 - <unknown>
  51:                0x0 - <unknown>

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.69.0-nightly (065852def 2023-02-13) running on x86_64-unknown-linux-gnu

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C linker=clang -C incremental=[REDACTED] -C link-arg=-fuse-ld=lld

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
#0 [collect_and_partition_mono_items] collect_and_partition_mono_items
end of query stack
```
</p>
</details>