Skip to content

ICE: None in compiler/rustc_pattern_analysis/src/constructor.rs #119778

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
matthiaskrgr opened this issue Jan 9, 2024 · 6 comments · Fixed by #119715
Closed

ICE: None in compiler/rustc_pattern_analysis/src/constructor.rs #119778

matthiaskrgr opened this issue Jan 9, 2024 · 6 comments · Fixed by #119715
Assignees
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@matthiaskrgr
Copy link
Member

snippet:

fn foo() {
    #[derive(Copy, Clone)]
    struct Foo([u8; S]);

    type U = impl Copy;
    let foo: U = Foo(());
    let Foo(()) = foo;
}

Version information

rustc 1.77.0-nightly (5876c8cdf 2024-01-09)
binary: rustc
commit-hash: 5876c8cdfd3df742c334d6447d44d760c77103b6
commit-date: 2024-01-09
host: x86_64-unknown-linux-gnu
release: 1.77.0-nightly
LLVM version: 17.0.6

Command:
/home/matthias/.rustup/toolchains/master/bin/rustc

Program output

error[E0425]: cannot find value `S` in this scope
 --> /tmp/icemaker_global_tempdir.MnLEJ0j8mGwA/rustc_testrunner_tmpdir_reporting.04LCQlMXQ1lR/mvce.rs:3:21
  |
3 |     struct Foo([u8; S]);
  |                     ^ not found in this scope
  |
help: you might be missing a const parameter
  |
3 |     struct Foo<const S: /* Type */>([u8; S]);
  |               +++++++++++++++++++++

error[E0425]: cannot find value `S` in this scope
 --> /tmp/icemaker_global_tempdir.MnLEJ0j8mGwA/rustc_testrunner_tmpdir_reporting.04LCQlMXQ1lR/mvce.rs:3:21
  |
3 |     struct Foo([u8; S]);
  |                     ^ not found in this scope
  |
help: you might be missing a const parameter
  |
3 |     struct Foo<const S: /* Type */>([u8; S]);
  |               +++++++++++++++++++++

error[E0658]: `impl Trait` in type aliases is unstable
 --> /tmp/icemaker_global_tempdir.MnLEJ0j8mGwA/rustc_testrunner_tmpdir_reporting.04LCQlMXQ1lR/mvce.rs:5:14
  |
5 |     type U = impl Copy;
  |              ^^^^^^^^^
  |
  = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
  = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable

error[E0601]: `main` function not found in crate `mvce`
 --> /tmp/icemaker_global_tempdir.MnLEJ0j8mGwA/rustc_testrunner_tmpdir_reporting.04LCQlMXQ1lR/mvce.rs:8:2
  |
8 | }
  |  ^ consider adding a `main` function to `/tmp/icemaker_global_tempdir.MnLEJ0j8mGwA/rustc_testrunner_tmpdir_reporting.04LCQlMXQ1lR/mvce.rs`

thread 'rustc' panicked at compiler/rustc_pattern_analysis/src/constructor.rs:974:68:
called `Option::unwrap()` on a `None` value
stack backtrace:
   0:     0x7ff3ed18c7e6 - std::backtrace_rs::backtrace::libunwind::trace::h22432f2d2b5bf0bd
                               at /rustc/5876c8cdfd3df742c334d6447d44d760c77103b6/library/std/src/../../backtrace/src/backtrace/libunwind.rs:104:5
   1:     0x7ff3ed18c7e6 - std::backtrace_rs::backtrace::trace_unsynchronized::h3210bc4d2757c620
                               at /rustc/5876c8cdfd3df742c334d6447d44d760c77103b6/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7ff3ed18c7e6 - std::sys_common::backtrace::_print_fmt::h54d5d886e937a688
                               at /rustc/5876c8cdfd3df742c334d6447d44d760c77103b6/library/std/src/sys_common/backtrace.rs:68:5
   3:     0x7ff3ed18c7e6 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h8cfe8ec93c34eb9d
                               at /rustc/5876c8cdfd3df742c334d6447d44d760c77103b6/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7ff3ed1deed0 - core::fmt::rt::Argument::fmt::hae6cc6040f3e0c90
                               at /rustc/5876c8cdfd3df742c334d6447d44d760c77103b6/library/core/src/fmt/rt.rs:142:9
   5:     0x7ff3ed1deed0 - core::fmt::write::hc7b6cded6f5e27fc
                               at /rustc/5876c8cdfd3df742c334d6447d44d760c77103b6/library/core/src/fmt/mod.rs:1120:17
   6:     0x7ff3ed18014f - std::io::Write::write_fmt::h02c96d5a9e0cebb8
                               at /rustc/5876c8cdfd3df742c334d6447d44d760c77103b6/library/std/src/io/mod.rs:1810:15
   7:     0x7ff3ed18c5c4 - std::sys_common::backtrace::_print::ha3f3c1a5b4439db4
                               at /rustc/5876c8cdfd3df742c334d6447d44d760c77103b6/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x7ff3ed18c5c4 - std::sys_common::backtrace::print::h507d4d1bb56ce44b
                               at /rustc/5876c8cdfd3df742c334d6447d44d760c77103b6/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x7ff3ed18f357 - std::panicking::default_hook::{{closure}}::h65a3151b1876a3af
  10:     0x7ff3ed18f0b9 - std::panicking::default_hook::h9ef59f7abe1ea54e
                               at /rustc/5876c8cdfd3df742c334d6447d44d760c77103b6/library/std/src/panicking.rs:292:9
  11:     0x7ff3eff42e3c - std[14048a6e3d26e6bf]::panicking::update_hook::<alloc[8ca07d96859391f5]::boxed::Box<rustc_driver_impl[225aaeb59ef26519]::install_ice_hook::{closure#0}>>::{closure#0}
  12:     0x7ff3ed18faa6 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::hc12cf58693cd0c5a
                               at /rustc/5876c8cdfd3df742c334d6447d44d760c77103b6/library/alloc/src/boxed.rs:2030:9
  13:     0x7ff3ed18faa6 - std::panicking::rust_panic_with_hook::hfd4d7315ed862dbf
                               at /rustc/5876c8cdfd3df742c334d6447d44d760c77103b6/library/std/src/panicking.rs:785:13
  14:     0x7ff3ed18f7b9 - std::panicking::begin_panic_handler::{{closure}}::h0e15306544c1283c
                               at /rustc/5876c8cdfd3df742c334d6447d44d760c77103b6/library/std/src/panicking.rs:651:13
  15:     0x7ff3ed18cce6 - std::sys_common::backtrace::__rust_end_short_backtrace::hc249c15ff6f12815
                               at /rustc/5876c8cdfd3df742c334d6447d44d760c77103b6/library/std/src/sys_common/backtrace.rs:171:18
  16:     0x7ff3ed18f550 - rust_begin_unwind
                               at /rustc/5876c8cdfd3df742c334d6447d44d760c77103b6/library/std/src/panicking.rs:647:5
  17:     0x7ff3ed1db5d5 - core::panicking::panic_fmt::hcb95115169fb405b
                               at /rustc/5876c8cdfd3df742c334d6447d44d760c77103b6/library/core/src/panicking.rs:72:14
  18:     0x7ff3ed1db693 - core::panicking::panic::h409786173c924b3a
                               at /rustc/5876c8cdfd3df742c334d6447d44d760c77103b6/library/core/src/panicking.rs:144:5
  19:     0x7ff3f1e8da06 - rustc_pattern_analysis[2409fe652759a152]::usefulness::compute_exhaustiveness_and_usefulness::<rustc_pattern_analysis[2409fe652759a152]::rustc::RustcMatchCheckCtxt>::{closure#0}
  20:     0x7ff3f1e87d92 - rustc_pattern_analysis[2409fe652759a152]::usefulness::compute_exhaustiveness_and_usefulness::<rustc_pattern_analysis[2409fe652759a152]::rustc::RustcMatchCheckCtxt>::{closure#0}
  21:     0x7ff3f1538ce8 - rustc_pattern_analysis[2409fe652759a152]::analyze_match
  22:     0x7ff3ee1ef529 - <rustc_mir_build[210b150a372fc993]::thir::pattern::check_match::MatchVisitor>::check_binding_is_irrefutable
  23:     0x7ff3ee1e6dcd - <rustc_mir_build[210b150a372fc993]::thir::pattern::check_match::MatchVisitor as rustc_middle[4f1cc949cb916381]::thir::visit::Visitor>::visit_expr
  24:     0x7ff3ee1e5d8d - <rustc_mir_build[210b150a372fc993]::thir::pattern::check_match::MatchVisitor as rustc_middle[4f1cc949cb916381]::thir::visit::Visitor>::visit_expr
  25:     0x7ff3f1658641 - rustc_mir_build[210b150a372fc993]::thir::pattern::check_match::check_match
  26:     0x7ff3f165824f - rustc_query_impl[ce36f755acb2e2d6]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ce36f755acb2e2d6]::query_impl::check_match::dynamic_query::{closure#2}::{closure#0}, rustc_middle[4f1cc949cb916381]::query::erase::Erased<[u8; 1usize]>>
  27:     0x7ff3f1657807 - rustc_query_system[7a8caa5e8205af2]::query::plumbing::try_execute_query::<rustc_query_impl[ce36f755acb2e2d6]::DynamicConfig<rustc_query_system[7a8caa5e8205af2]::query::caches::VecCache<rustc_span[a636862c99cc45ed]::def_id::LocalDefId, rustc_middle[4f1cc949cb916381]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[ce36f755acb2e2d6]::plumbing::QueryCtxt, false>
  28:     0x7ff3f165749d - rustc_query_impl[ce36f755acb2e2d6]::query_impl::check_match::get_query_non_incr::__rust_end_short_backtrace
  29:     0x7ff3f16f260f - rustc_mir_build[210b150a372fc993]::build::mir_built
  30:     0x7ff3f16f2473 - rustc_query_impl[ce36f755acb2e2d6]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ce36f755acb2e2d6]::query_impl::mir_built::dynamic_query::{closure#2}::{closure#0}, rustc_middle[4f1cc949cb916381]::query::erase::Erased<[u8; 8usize]>>
  31:     0x7ff3f16f0b79 - rustc_query_system[7a8caa5e8205af2]::query::plumbing::try_execute_query::<rustc_query_impl[ce36f755acb2e2d6]::DynamicConfig<rustc_query_system[7a8caa5e8205af2]::query::caches::VecCache<rustc_span[a636862c99cc45ed]::def_id::LocalDefId, rustc_middle[4f1cc949cb916381]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[ce36f755acb2e2d6]::plumbing::QueryCtxt, false>
  32:     0x7ff3f16f0750 - rustc_query_impl[ce36f755acb2e2d6]::query_impl::mir_built::get_query_non_incr::__rust_end_short_backtrace
  33:     0x7ff3f12db4b0 - rustc_mir_transform[c422ef779d6b8140]::ffi_unwind_calls::has_ffi_unwind_calls
  34:     0x7ff3f12db01d - rustc_query_impl[ce36f755acb2e2d6]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ce36f755acb2e2d6]::query_impl::has_ffi_unwind_calls::dynamic_query::{closure#2}::{closure#0}, rustc_middle[4f1cc949cb916381]::query::erase::Erased<[u8; 1usize]>>
  35:     0x7ff3f165773d - rustc_query_system[7a8caa5e8205af2]::query::plumbing::try_execute_query::<rustc_query_impl[ce36f755acb2e2d6]::DynamicConfig<rustc_query_system[7a8caa5e8205af2]::query::caches::VecCache<rustc_span[a636862c99cc45ed]::def_id::LocalDefId, rustc_middle[4f1cc949cb916381]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[ce36f755acb2e2d6]::plumbing::QueryCtxt, false>
  36:     0x7ff3f1657403 - rustc_query_impl[ce36f755acb2e2d6]::query_impl::has_ffi_unwind_calls::get_query_non_incr::__rust_end_short_backtrace
  37:     0x7ff3f15eb98f - rustc_mir_transform[c422ef779d6b8140]::mir_const
  38:     0x7ff3f15eb8c9 - rustc_query_impl[ce36f755acb2e2d6]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ce36f755acb2e2d6]::query_impl::mir_const::dynamic_query::{closure#2}::{closure#0}, rustc_middle[4f1cc949cb916381]::query::erase::Erased<[u8; 8usize]>>
  39:     0x7ff3f16f0b79 - rustc_query_system[7a8caa5e8205af2]::query::plumbing::try_execute_query::<rustc_query_impl[ce36f755acb2e2d6]::DynamicConfig<rustc_query_system[7a8caa5e8205af2]::query::caches::VecCache<rustc_span[a636862c99cc45ed]::def_id::LocalDefId, rustc_middle[4f1cc949cb916381]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[ce36f755acb2e2d6]::plumbing::QueryCtxt, false>
  40:     0x7ff3f16f0690 - rustc_query_impl[ce36f755acb2e2d6]::query_impl::mir_const::get_query_non_incr::__rust_end_short_backtrace
  41:     0x7ff3ef469592 - rustc_mir_transform[c422ef779d6b8140]::mir_promoted
  42:     0x7ff3f18fdd20 - rustc_query_impl[ce36f755acb2e2d6]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ce36f755acb2e2d6]::query_impl::mir_promoted::dynamic_query::{closure#2}::{closure#0}, rustc_middle[4f1cc949cb916381]::query::erase::Erased<[u8; 16usize]>>
  43:     0x7ff3f18fdfea - rustc_query_system[7a8caa5e8205af2]::query::plumbing::try_execute_query::<rustc_query_impl[ce36f755acb2e2d6]::DynamicConfig<rustc_query_system[7a8caa5e8205af2]::query::caches::VecCache<rustc_span[a636862c99cc45ed]::def_id::LocalDefId, rustc_middle[4f1cc949cb916381]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[ce36f755acb2e2d6]::plumbing::QueryCtxt, false>
  44:     0x7ff3f20cb913 - rustc_query_impl[ce36f755acb2e2d6]::query_impl::mir_promoted::get_query_non_incr::__rust_end_short_backtrace
  45:     0x7ff3f20cba30 - rustc_borrowck[3ad2da42b5ca0d17]::mir_borrowck
  46:     0x7ff3f20cb959 - rustc_query_impl[ce36f755acb2e2d6]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ce36f755acb2e2d6]::query_impl::mir_borrowck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[4f1cc949cb916381]::query::erase::Erased<[u8; 8usize]>>
  47:     0x7ff3f16f0b79 - rustc_query_system[7a8caa5e8205af2]::query::plumbing::try_execute_query::<rustc_query_impl[ce36f755acb2e2d6]::DynamicConfig<rustc_query_system[7a8caa5e8205af2]::query::caches::VecCache<rustc_span[a636862c99cc45ed]::def_id::LocalDefId, rustc_middle[4f1cc949cb916381]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[ce36f755acb2e2d6]::plumbing::QueryCtxt, false>
  48:     0x7ff3f16f05d4 - rustc_query_impl[ce36f755acb2e2d6]::query_impl::mir_borrowck::get_query_non_incr::__rust_end_short_backtrace
  49:     0x7ff3f26e9ad9 - rustc_middle[4f1cc949cb916381]::query::plumbing::query_get_at::<rustc_query_system[7a8caa5e8205af2]::query::caches::VecCache<rustc_span[a636862c99cc45ed]::def_id::LocalDefId, rustc_middle[4f1cc949cb916381]::query::erase::Erased<[u8; 8usize]>>>.llvm.583859384311332609.cold.0
  50:     0x7ff3f008522d - <rustc_hir_analysis[b2cf9ffbb8cc69bc]::collect::type_of::opaque::TaitConstraintLocator>::check
  51:     0x7ff3f0073190 - <rustc_hir_analysis[b2cf9ffbb8cc69bc]::collect::type_of::opaque::TaitConstraintLocator as rustc_hir[707c8cb46efdf026]::intravisit::Visitor>::visit_item
  52:     0x7ff3f21e43fc - rustc_hir_analysis[b2cf9ffbb8cc69bc]::collect::type_of::type_of_opaque
  53:     0x7ff3f21e395b - rustc_query_impl[ce36f755acb2e2d6]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ce36f755acb2e2d6]::query_impl::type_of_opaque::dynamic_query::{closure#2}::{closure#0}, rustc_middle[4f1cc949cb916381]::query::erase::Erased<[u8; 8usize]>>
  54:     0x7ff3f1257114 - rustc_query_system[7a8caa5e8205af2]::query::plumbing::try_execute_query::<rustc_query_impl[ce36f755acb2e2d6]::DynamicConfig<rustc_query_system[7a8caa5e8205af2]::query::caches::DefaultCache<rustc_span[a636862c99cc45ed]::def_id::DefId, rustc_middle[4f1cc949cb916381]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[ce36f755acb2e2d6]::plumbing::QueryCtxt, false>
  55:     0x7ff3f2238822 - rustc_query_impl[ce36f755acb2e2d6]::query_impl::type_of_opaque::get_query_non_incr::__rust_end_short_backtrace
  56:     0x7ff3f12e6bf8 - rustc_middle[4f1cc949cb916381]::query::plumbing::query_get_at::<rustc_query_system[7a8caa5e8205af2]::query::caches::DefaultCache<rustc_span[a636862c99cc45ed]::def_id::DefId, rustc_middle[4f1cc949cb916381]::query::erase::Erased<[u8; 8usize]>>>
  57:     0x7ff3ef609c81 - rustc_hir_analysis[b2cf9ffbb8cc69bc]::collect::type_of::type_of
  58:     0x7ff3f125827e - rustc_query_impl[ce36f755acb2e2d6]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ce36f755acb2e2d6]::query_impl::type_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle[4f1cc949cb916381]::query::erase::Erased<[u8; 8usize]>>
  59:     0x7ff3f1257114 - rustc_query_system[7a8caa5e8205af2]::query::plumbing::try_execute_query::<rustc_query_impl[ce36f755acb2e2d6]::DynamicConfig<rustc_query_system[7a8caa5e8205af2]::query::caches::DefaultCache<rustc_span[a636862c99cc45ed]::def_id::DefId, rustc_middle[4f1cc949cb916381]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[ce36f755acb2e2d6]::plumbing::QueryCtxt, false>
  60:     0x7ff3f1256cdd - rustc_query_impl[ce36f755acb2e2d6]::query_impl::type_of::get_query_non_incr::__rust_end_short_backtrace
  61:     0x7ff3f12e6bf8 - rustc_middle[4f1cc949cb916381]::query::plumbing::query_get_at::<rustc_query_system[7a8caa5e8205af2]::query::caches::DefaultCache<rustc_span[a636862c99cc45ed]::def_id::DefId, rustc_middle[4f1cc949cb916381]::query::erase::Erased<[u8; 8usize]>>>
  62:     0x7ff3f1ce04af - rustc_hir_analysis[b2cf9ffbb8cc69bc]::check::check::check_item_type
  63:     0x7ff3f18eed1e - rustc_hir_analysis[b2cf9ffbb8cc69bc]::check::wfcheck::check_well_formed
  64:     0x7ff3f18edcb3 - rustc_query_impl[ce36f755acb2e2d6]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ce36f755acb2e2d6]::query_impl::check_well_formed::dynamic_query::{closure#2}::{closure#0}, rustc_middle[4f1cc949cb916381]::query::erase::Erased<[u8; 1usize]>>
  65:     0x7ff3f18ed3b1 - rustc_query_system[7a8caa5e8205af2]::query::plumbing::try_execute_query::<rustc_query_impl[ce36f755acb2e2d6]::DynamicConfig<rustc_query_system[7a8caa5e8205af2]::query::caches::VecCache<rustc_hir[707c8cb46efdf026]::hir_id::OwnerId, rustc_middle[4f1cc949cb916381]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[ce36f755acb2e2d6]::plumbing::QueryCtxt, false>
  66:     0x7ff3f18ed11b - rustc_query_impl[ce36f755acb2e2d6]::query_impl::check_well_formed::get_query_non_incr::__rust_end_short_backtrace
  67:     0x7ff3f18eaab7 - rustc_hir_analysis[b2cf9ffbb8cc69bc]::check::wfcheck::check_mod_type_wf
  68:     0x7ff3f18ea9fb - rustc_query_impl[ce36f755acb2e2d6]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ce36f755acb2e2d6]::query_impl::check_mod_type_wf::dynamic_query::{closure#2}::{closure#0}, rustc_middle[4f1cc949cb916381]::query::erase::Erased<[u8; 1usize]>>
  69:     0x7ff3f18e9bbb - rustc_query_system[7a8caa5e8205af2]::query::plumbing::try_execute_query::<rustc_query_impl[ce36f755acb2e2d6]::DynamicConfig<rustc_query_system[7a8caa5e8205af2]::query::caches::DefaultCache<rustc_span[a636862c99cc45ed]::def_id::LocalModDefId, rustc_middle[4f1cc949cb916381]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[ce36f755acb2e2d6]::plumbing::QueryCtxt, false>
  70:     0x7ff3f18e9949 - rustc_query_impl[ce36f755acb2e2d6]::query_impl::check_mod_type_wf::get_query_non_incr::__rust_end_short_backtrace
  71:     0x7ff3f18e985a - <rustc_middle[4f1cc949cb916381]::hir::map::Map>::try_par_for_each_module::<rustc_hir_analysis[b2cf9ffbb8cc69bc]::check_crate::{closure#4}::{closure#0}>::{closure#0}
  72:     0x7ff3f16ee81c - rustc_hir_analysis[b2cf9ffbb8cc69bc]::check_crate
  73:     0x7ff3f1e2fad9 - rustc_interface[9afdb325f305e9c4]::passes::analysis
  74:     0x7ff3f1e2f71f - rustc_query_impl[ce36f755acb2e2d6]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ce36f755acb2e2d6]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[4f1cc949cb916381]::query::erase::Erased<[u8; 1usize]>>
  75:     0x7ff3f21b85e4 - rustc_query_system[7a8caa5e8205af2]::query::plumbing::try_execute_query::<rustc_query_impl[ce36f755acb2e2d6]::DynamicConfig<rustc_query_system[7a8caa5e8205af2]::query::caches::SingleCache<rustc_middle[4f1cc949cb916381]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[ce36f755acb2e2d6]::plumbing::QueryCtxt, false>
  76:     0x7ff3f21b83d5 - rustc_query_impl[ce36f755acb2e2d6]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  77:     0x7ff3f1f53f08 - rustc_interface[9afdb325f305e9c4]::interface::run_compiler::<core[9cf31fa6f05897b6]::result::Result<(), rustc_span[a636862c99cc45ed]::ErrorGuaranteed>, rustc_driver_impl[225aaeb59ef26519]::run_compiler::{closure#0}>::{closure#0}
  78:     0x7ff3f21d8c46 - std[14048a6e3d26e6bf]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[9afdb325f305e9c4]::util::run_in_thread_with_globals<rustc_interface[9afdb325f305e9c4]::util::run_in_thread_pool_with_globals<rustc_interface[9afdb325f305e9c4]::interface::run_compiler<core[9cf31fa6f05897b6]::result::Result<(), rustc_span[a636862c99cc45ed]::ErrorGuaranteed>, rustc_driver_impl[225aaeb59ef26519]::run_compiler::{closure#0}>::{closure#0}, core[9cf31fa6f05897b6]::result::Result<(), rustc_span[a636862c99cc45ed]::ErrorGuaranteed>>::{closure#0}, core[9cf31fa6f05897b6]::result::Result<(), rustc_span[a636862c99cc45ed]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[9cf31fa6f05897b6]::result::Result<(), rustc_span[a636862c99cc45ed]::ErrorGuaranteed>>
  79:     0x7ff3f21d8a73 - <<std[14048a6e3d26e6bf]::thread::Builder>::spawn_unchecked_<rustc_interface[9afdb325f305e9c4]::util::run_in_thread_with_globals<rustc_interface[9afdb325f305e9c4]::util::run_in_thread_pool_with_globals<rustc_interface[9afdb325f305e9c4]::interface::run_compiler<core[9cf31fa6f05897b6]::result::Result<(), rustc_span[a636862c99cc45ed]::ErrorGuaranteed>, rustc_driver_impl[225aaeb59ef26519]::run_compiler::{closure#0}>::{closure#0}, core[9cf31fa6f05897b6]::result::Result<(), rustc_span[a636862c99cc45ed]::ErrorGuaranteed>>::{closure#0}, core[9cf31fa6f05897b6]::result::Result<(), rustc_span[a636862c99cc45ed]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[9cf31fa6f05897b6]::result::Result<(), rustc_span[a636862c99cc45ed]::ErrorGuaranteed>>::{closure#1} as core[9cf31fa6f05897b6]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  80:     0x7ff3ed1999d5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hfee459d51dc03ddb
                               at /rustc/5876c8cdfd3df742c334d6447d44d760c77103b6/library/alloc/src/boxed.rs:2016:9
  81:     0x7ff3ed1999d5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h19b99675aff429ed
                               at /rustc/5876c8cdfd3df742c334d6447d44d760c77103b6/library/alloc/src/boxed.rs:2016:9
  82:     0x7ff3ed1999d5 - std::sys::unix::thread::Thread::new::thread_start::hbd77c0532d512c72
                               at /rustc/5876c8cdfd3df742c334d6447d44d760c77103b6/library/std/src/sys/unix/thread.rs:108:17
  83:     0x7ff3ecf859eb - <unknown>
  84:     0x7ff3ed0097cc - <unknown>
  85:                0x0 - <unknown>

error: 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.77.0-nightly (5876c8cdf 2024-01-09) running on x86_64-unknown-linux-gnu

query stack during panic:
#0 [check_match] match-checking `foo`
#1 [mir_built] building MIR for `foo`
#2 [has_ffi_unwind_calls] checking if `foo` contains FFI-unwind calls
#3 [mir_const] preparing `foo` for borrow checking
#4 [mir_promoted] promoting constants in MIR for `foo`
#5 [mir_borrowck] borrow-checking `foo`
#6 [type_of_opaque] computing type of opaque `foo::U::{opaque#0}`
#7 [type_of] computing type of `foo::U::{opaque#0}`
#8 [check_well_formed] checking that `foo::U::{opaque#0}` is well-formed
#9 [check_mod_type_wf] checking that types are well-formed in top-level module
#10 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 4 previous errors

Some errors have detailed explanations: E0425, E0601, E0658.
For more information about an error, try `rustc --explain E0425`.

@matthiaskrgr matthiaskrgr added I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. C-bug Category: This is a bug. labels Jan 9, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jan 9, 2024
@compiler-errors
Copy link
Member

This seems to be a close duplicate of #119493, and therefore likely fixed by #119715.

@clubby789
Copy link
Contributor

#119715 doesn't seem to fix this - we still ICE with the sam error

@compiler-errors
Copy link
Member

ok cc @Nadrieril

@Nadrieril Nadrieril self-assigned this Jan 9, 2024
@Nadrieril
Copy link
Member

@clubby789 could you try that same PR but only the first two commits?

@matthiaskrgr
Copy link
Member Author

Seems to not crash on 4b2e8bc / Abort analysis on type error

Nadrieril added a commit to Nadrieril/rust that referenced this issue Jan 10, 2024
@Nadrieril
Copy link
Member

Thanks for testing! #119715 fixes this too now.

@Nadrieril Nadrieril removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jan 10, 2024
@bors bors closed this as completed in 4dcc5a0 Jan 11, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Jan 11, 2024
Rollup merge of rust-lang#119715 - Nadrieril:graceful-type-error, r=compiler-errors

Exhaustiveness: abort on type error

This adds an error path to exhaustiveness checking so that we abort instead of ICEing when encountering a stray `ty::Error`.

Fixes rust-lang#119493
Fixes rust-lang#119778

r? `@compiler-errors`
github-actions bot pushed a commit to rust-lang/miri that referenced this issue Jan 11, 2024
…rrors

Exhaustiveness: abort on type error

This adds an error path to exhaustiveness checking so that we abort instead of ICEing when encountering a stray `ty::Error`.

Fixes rust-lang/rust#119493
Fixes rust-lang/rust#119778

r? `@compiler-errors`
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants