Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

ICE: assertion failed: !ty.has_non_region_infer() #122638

Open
matthiaskrgr opened this issue Mar 17, 2024 · 10 comments
Open

ICE: assertion failed: !ty.has_non_region_infer() #122638

matthiaskrgr opened this issue Mar 17, 2024 · 10 comments
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ S-bug-has-test Status: This bug is tracked inside the repo by a `known-bug` test. S-has-mcve Status: A Minimal Complete and Verifiable Example has been found for this issue T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@matthiaskrgr
Copy link
Member

matthiaskrgr commented Mar 17, 2024

snippet, original probably from tests/ui/const-generics/type-dependent/issue-70507.rs

#![feature(min_specialization)]

impl<'a, T: std::fmt::Debug, const N: usize> Iterator for ConstChunksExact<'a, T, { N }> {
    fn next(&mut self) -> Option<Self::Item> {}
}

struct ConstChunksExact<'a, T: '_, const assert: usize> {}

impl<'a, T: std::fmt::Debug, const N: usize> Iterator for ConstChunksExact<'a, T, {}> {
    type Item = &'a [T; N];
}

Version information

rustc 1.79.0-nightly (ecdea9e94 2024-03-17)
binary: rustc
commit-hash: ecdea9e9438cdb8cf707e7f60e066eda02344d05
commit-date: 2024-03-17
host: x86_64-unknown-linux-gnu
release: 1.79.0-nightly
LLVM version: 18.1.2

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

Program output

error[E0637]: `'_` cannot be used here
 --> /tmp/icemaker_global_tempdir.NwJkWeuZqOxD/rustc_testrunner_tmpdir_reporting.DGCv6r40KmDi/mvce.rs:7:32
  |
7 | struct ConstChunksExact<'a, T: '_, const assert: usize> {}
  |                                ^^ `'_` is a reserved lifetime name

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

error[E0308]: mismatched types
 --> /tmp/icemaker_global_tempdir.NwJkWeuZqOxD/rustc_testrunner_tmpdir_reporting.DGCv6r40KmDi/mvce.rs:9:83
  |
9 | impl<'a, T: std::fmt::Debug, const N: usize> Iterator for ConstChunksExact<'a, T, {}> {
  |                                                                                   ^^ expected `usize`, found `()`

thread 'rustc' panicked at compiler/rustc_trait_selection/src/traits/outlives_bounds.rs:51:5:
assertion failed: !ty.has_non_region_infer()
stack backtrace:
   0:     0x7f8b45b8c912 - std::backtrace_rs::backtrace::libunwind::trace::h130a839c96311127
                               at /rustc/ecdea9e9438cdb8cf707e7f60e066eda02344d05/library/std/src/../../backtrace/src/backtrace/libunwind.rs:105:5
   1:     0x7f8b45b8c912 - std::backtrace_rs::backtrace::trace_unsynchronized::h5053166127c32fca
                               at /rustc/ecdea9e9438cdb8cf707e7f60e066eda02344d05/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f8b45b8c912 - std::sys_common::backtrace::_print_fmt::hc8bfe34d9b6ab8fa
                               at /rustc/ecdea9e9438cdb8cf707e7f60e066eda02344d05/library/std/src/sys_common/backtrace.rs:68:5
   3:     0x7f8b45b8c912 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hf5178e0e8c2a3754
                               at /rustc/ecdea9e9438cdb8cf707e7f60e066eda02344d05/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f8b45bddc8c - core::fmt::rt::Argument::fmt::h0a056d227bbd784c
                               at /rustc/ecdea9e9438cdb8cf707e7f60e066eda02344d05/library/core/src/fmt/rt.rs:142:9
   5:     0x7f8b45bddc8c - core::fmt::write::h10db7fef763d7bc1
                               at /rustc/ecdea9e9438cdb8cf707e7f60e066eda02344d05/library/core/src/fmt/mod.rs:1153:17
   6:     0x7f8b45b8180f - std::io::Write::write_fmt::hae2c866742ac8216
                               at /rustc/ecdea9e9438cdb8cf707e7f60e066eda02344d05/library/std/src/io/mod.rs:1843:15
   7:     0x7f8b45b8c6e4 - std::sys_common::backtrace::_print::h5b25d695d3c3668b
                               at /rustc/ecdea9e9438cdb8cf707e7f60e066eda02344d05/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x7f8b45b8c6e4 - std::sys_common::backtrace::print::h734c64740bca27d9
                               at /rustc/ecdea9e9438cdb8cf707e7f60e066eda02344d05/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x7f8b45b8f3eb - std::panicking::default_hook::{{closure}}::hee6d4abdb3c0f483
  10:     0x7f8b45b8f143 - std::panicking::default_hook::h6fd6c192a391bb75
                               at /rustc/ecdea9e9438cdb8cf707e7f60e066eda02344d05/library/std/src/panicking.rs:292:9
  11:     0x7f8b48bb545f - std[1edb51698615b6b2]::panicking::update_hook::<alloc[e67a01ca5641d9fc]::boxed::Box<rustc_driver_impl[e0ef1a8995aede8b]::install_ice_hook::{closure#0}>>::{closure#0}
  12:     0x7f8b45b8fb50 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h3d34b5ca386d93df
                               at /rustc/ecdea9e9438cdb8cf707e7f60e066eda02344d05/library/alloc/src/boxed.rs:2034:9
  13:     0x7f8b45b8fb50 - std::panicking::rust_panic_with_hook::ha06f2d1f1e60cb61
                               at /rustc/ecdea9e9438cdb8cf707e7f60e066eda02344d05/library/std/src/panicking.rs:783:13
  14:     0x7f8b45b8f859 - std::panicking::begin_panic_handler::{{closure}}::h8bd340824b2f16fb
                               at /rustc/ecdea9e9438cdb8cf707e7f60e066eda02344d05/library/std/src/panicking.rs:649:13
  15:     0x7f8b45b8cde6 - std::sys_common::backtrace::__rust_end_short_backtrace::h73dc69ff952ce613
                               at /rustc/ecdea9e9438cdb8cf707e7f60e066eda02344d05/library/std/src/sys_common/backtrace.rs:171:18
  16:     0x7f8b45b8f5c4 - rust_begin_unwind
                               at /rustc/ecdea9e9438cdb8cf707e7f60e066eda02344d05/library/std/src/panicking.rs:645:5
  17:     0x7f8b45bda1a5 - core::panicking::panic_fmt::heaebb21c3402ed66
                               at /rustc/ecdea9e9438cdb8cf707e7f60e066eda02344d05/library/core/src/panicking.rs:72:14
  18:     0x7f8b45bda263 - core::panicking::panic::he4503a1f8c8c6482
                               at /rustc/ecdea9e9438cdb8cf707e7f60e066eda02344d05/library/core/src/panicking.rs:145:5
  19:     0x7f8b4788b3ad - rustc_trait_selection[7f61bd169b63885]::traits::outlives_bounds::implied_outlives_bounds
  20:     0x7f8b4a4c1436 - <rustc_infer[d3187ed693eaf61e]::infer::outlives::env::OutlivesEnvironment>::with_bounds::<core[b12cd9a0ca34f197]::iter::adapters::flatten::FlatMap<indexmap[d807711f4009a88]::set::iter::Iter<rustc_middle[7b6cdb9727477273]::ty::Ty>, alloc[e67a01ca5641d9fc]::vec::Vec<rustc_middle[7b6cdb9727477273]::traits::query::OutlivesBound>, <rustc_infer[d3187ed693eaf61e]::infer::InferCtxt as rustc_trait_selection[7f61bd169b63885]::traits::outlives_bounds::InferCtxtExt>::implied_bounds_tys::{closure#0}>>
  21:     0x7f8b4a4a0fe0 - rustc_hir_analysis[3992a0a0dd7933ad]::check::check::check_item_type
  22:     0x7f8b4a4c9adc - rustc_hir_analysis[3992a0a0dd7933ad]::check::wfcheck::check_well_formed
  23:     0x7f8b4a4c85c7 - rustc_query_impl[199a7318a0a2d0ea]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[199a7318a0a2d0ea]::query_impl::check_well_formed::dynamic_query::{closure#2}::{closure#0}, rustc_middle[7b6cdb9727477273]::query::erase::Erased<[u8; 1usize]>>
  24:     0x7f8b4a4c7d40 - rustc_query_system[5343cac5ae2d7d0f]::query::plumbing::try_execute_query::<rustc_query_impl[199a7318a0a2d0ea]::DynamicConfig<rustc_query_system[5343cac5ae2d7d0f]::query::caches::VecCache<rustc_hir[a79073bc83b4044]::hir_id::OwnerId, rustc_middle[7b6cdb9727477273]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[199a7318a0a2d0ea]::plumbing::QueryCtxt, false>
  25:     0x7f8b4a4c7abf - rustc_query_impl[199a7318a0a2d0ea]::query_impl::check_well_formed::get_query_non_incr::__rust_end_short_backtrace
  26:     0x7f8b4a4c59fa - rustc_hir_analysis[3992a0a0dd7933ad]::check::wfcheck::check_mod_type_wf
  27:     0x7f8b4a4c5821 - rustc_query_impl[199a7318a0a2d0ea]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[199a7318a0a2d0ea]::query_impl::check_mod_type_wf::dynamic_query::{closure#2}::{closure#0}, rustc_middle[7b6cdb9727477273]::query::erase::Erased<[u8; 1usize]>>
  28:     0x7f8b4a8936f0 - rustc_query_system[5343cac5ae2d7d0f]::query::plumbing::try_execute_query::<rustc_query_impl[199a7318a0a2d0ea]::DynamicConfig<rustc_query_system[5343cac5ae2d7d0f]::query::caches::DefaultCache<rustc_span[1fcd8257a8e9ae58]::def_id::LocalModDefId, rustc_middle[7b6cdb9727477273]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[199a7318a0a2d0ea]::plumbing::QueryCtxt, false>
  29:     0x7f8b4a89349b - rustc_query_impl[199a7318a0a2d0ea]::query_impl::check_mod_type_wf::get_query_non_incr::__rust_end_short_backtrace
  30:     0x7f8b4a16ef8b - rustc_hir_analysis[3992a0a0dd7933ad]::check_crate
  31:     0x7f8b4a2a492a - rustc_interface[f8af93c899996b27]::passes::analysis
  32:     0x7f8b4a2a4499 - rustc_query_impl[199a7318a0a2d0ea]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[199a7318a0a2d0ea]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[7b6cdb9727477273]::query::erase::Erased<[u8; 1usize]>>
  33:     0x7f8b4ab8c4a5 - rustc_query_system[5343cac5ae2d7d0f]::query::plumbing::try_execute_query::<rustc_query_impl[199a7318a0a2d0ea]::DynamicConfig<rustc_query_system[5343cac5ae2d7d0f]::query::caches::SingleCache<rustc_middle[7b6cdb9727477273]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[199a7318a0a2d0ea]::plumbing::QueryCtxt, false>
  34:     0x7f8b4ab8c209 - rustc_query_impl[199a7318a0a2d0ea]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  35:     0x7f8b4aa67fc4 - rustc_interface[f8af93c899996b27]::interface::run_compiler::<core[b12cd9a0ca34f197]::result::Result<(), rustc_span[1fcd8257a8e9ae58]::ErrorGuaranteed>, rustc_driver_impl[e0ef1a8995aede8b]::run_compiler::{closure#0}>::{closure#0}
  36:     0x7f8b4ab63a45 - std[1edb51698615b6b2]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[f8af93c899996b27]::util::run_in_thread_with_globals<rustc_interface[f8af93c899996b27]::util::run_in_thread_pool_with_globals<rustc_interface[f8af93c899996b27]::interface::run_compiler<core[b12cd9a0ca34f197]::result::Result<(), rustc_span[1fcd8257a8e9ae58]::ErrorGuaranteed>, rustc_driver_impl[e0ef1a8995aede8b]::run_compiler::{closure#0}>::{closure#0}, core[b12cd9a0ca34f197]::result::Result<(), rustc_span[1fcd8257a8e9ae58]::ErrorGuaranteed>>::{closure#0}, core[b12cd9a0ca34f197]::result::Result<(), rustc_span[1fcd8257a8e9ae58]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[b12cd9a0ca34f197]::result::Result<(), rustc_span[1fcd8257a8e9ae58]::ErrorGuaranteed>>
  37:     0x7f8b4ab63872 - <<std[1edb51698615b6b2]::thread::Builder>::spawn_unchecked_<rustc_interface[f8af93c899996b27]::util::run_in_thread_with_globals<rustc_interface[f8af93c899996b27]::util::run_in_thread_pool_with_globals<rustc_interface[f8af93c899996b27]::interface::run_compiler<core[b12cd9a0ca34f197]::result::Result<(), rustc_span[1fcd8257a8e9ae58]::ErrorGuaranteed>, rustc_driver_impl[e0ef1a8995aede8b]::run_compiler::{closure#0}>::{closure#0}, core[b12cd9a0ca34f197]::result::Result<(), rustc_span[1fcd8257a8e9ae58]::ErrorGuaranteed>>::{closure#0}, core[b12cd9a0ca34f197]::result::Result<(), rustc_span[1fcd8257a8e9ae58]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[b12cd9a0ca34f197]::result::Result<(), rustc_span[1fcd8257a8e9ae58]::ErrorGuaranteed>>::{closure#1} as core[b12cd9a0ca34f197]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  38:     0x7f8b45b991e5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h1668ba6e00dd332a
                               at /rustc/ecdea9e9438cdb8cf707e7f60e066eda02344d05/library/alloc/src/boxed.rs:2020:9
  39:     0x7f8b45b991e5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h19f13da360e1925b
                               at /rustc/ecdea9e9438cdb8cf707e7f60e066eda02344d05/library/alloc/src/boxed.rs:2020:9
  40:     0x7f8b45b991e5 - std::sys::pal::unix::thread::Thread::new::thread_start::h3bd6e605cc65dc69
                               at /rustc/ecdea9e9438cdb8cf707e7f60e066eda02344d05/library/std/src/sys/pal/unix/thread.rs:108:17
  41:     0x7f8b4598155a - <unknown>
  42:     0x7f8b459fea3c - <unknown>
  43:                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.79.0-nightly (ecdea9e94 2024-03-17) running on x86_64-unknown-linux-gnu

query stack during panic:
#0 [check_well_formed] checking that `<impl at /tmp/icemaker_global_tempdir.NwJkWeuZqOxD/rustc_testrunner_tmpdir_reporting.DGCv6r40KmDi/mvce.rs:3:1: 3:89>` is well-formed
#1 [check_mod_type_wf] checking that types are well-formed in top-level module
#2 [analysis] running analysis passes on this crate
end of query stack
error[E0392]: lifetime parameter `'a` is never used
 --> /tmp/icemaker_global_tempdir.NwJkWeuZqOxD/rustc_testrunner_tmpdir_reporting.DGCv6r40KmDi/mvce.rs:7:25
  |
7 | struct ConstChunksExact<'a, T: '_, const assert: usize> {}
  |                         ^^ unused lifetime parameter
  |
  = help: consider removing `'a`, referring to it in a field, or using a marker such as `PhantomData`

error[E0392]: type parameter `T` is never used
 --> /tmp/icemaker_global_tempdir.NwJkWeuZqOxD/rustc_testrunner_tmpdir_reporting.DGCv6r40KmDi/mvce.rs:7:29
  |
7 | struct ConstChunksExact<'a, T: '_, const assert: usize> {}
  |                             ^ unused type parameter
  |
  = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`

error[E0207]: the const parameter `N` is not constrained by the impl trait, self type, or predicates
 --> /tmp/icemaker_global_tempdir.NwJkWeuZqOxD/rustc_testrunner_tmpdir_reporting.DGCv6r40KmDi/mvce.rs:9:30
  |
9 | impl<'a, T: std::fmt::Debug, const N: usize> Iterator for ConstChunksExact<'a, T, {}> {
  |                              ^^^^^^^^^^^^^^ unconstrained const parameter
  |
  = note: expressions using a const parameter must map each value to a distinct output value
  = note: proving the result of expressions other than the parameter are unique is not supported

error: aborting due to 6 previous errors

Some errors have detailed explanations: E0207, E0308, E0392, E0601, E0637.
For more information about an error, try `rustc --explain E0207`.

@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. F-specialization `#![feature(specialization)]` labels Mar 17, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 17, 2024
@matthiaskrgr
Copy link
Member Author

bisects to #121154 cc @oli-obk

@jieyouxu jieyouxu added S-has-mcve Status: A Minimal Complete and Verifiable Example has been found for this issue and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Mar 17, 2024
@matthiaskrgr matthiaskrgr added the S-bug-has-test Status: This bug is tracked inside the repo by a `known-bug` test. label Apr 15, 2024
@BoxyUwU
Copy link
Member

BoxyUwU commented May 29, 2024

Same cause as #123141

@ajwock
Copy link
Contributor

ajwock commented Jun 1, 2024

I'm interested in working on this. I'm preparing a PR for this fix.

@BoxyUwU BoxyUwU removed the F-specialization `#![feature(specialization)]` label Jun 1, 2024
@ajwock
Copy link
Contributor

ajwock commented Jun 1, 2024

I misspoke, I'm not actually working on this one right now. I commented under the wrong issue, but since I'm trying to help fix specialization ICE I can take a look once I'm done with the other one.

@Naserume
Copy link

It looks like the code above doesn't reproduce ice since late May, so I'm leaving another code with same ICE message but without #![feature(min_specialization)].

struct Bar;

trait Trait: Sized {
    type Assoc;
}

impl Trait for Bar { }

impl Trait for <Bar as Trait>::Assoc {
    fn bar() -> impl Sized {
        loop {}
    }
}

fn main() {}

Meta
rustc --version --verbose:

rustc 1.81.0-nightly (bcf94dec5 2024-06-23)
binary: rustc
commit-hash: bcf94dec5ba6838e435902120c0384c360126a26
commit-date: 2024-06-23
host: x86_64-apple-darwin
release: 1.81.0-nightly
LLVM version: 18.1.7

Output

error[E0407]: method `bar` is not a member of trait `Trait`
  --> ./BC86F.rs:10:5
   |
10 | /     fn bar() -> impl Sized {
11 | |         loop {}
12 | |     }
   | |_____^ not a member of trait `Trait`

error[E0275]: overflow evaluating the requirement `Bar: Trait`
  |
  = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`BC86F`)

thread 'rustc' panicked at compiler/rustc_trait_selection/src/traits/outlives_bounds.rs:53:5:
assertion failed: !ty.has_non_region_infer()
stack backtrace:
   0:        0x1028e6b43 - <std::sys::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::he71f7af0ddafc64d
   1:        0x10293225b - core::fmt::write::h30d0e266faff29b6
   2:        0x1028dcace - std::io::Write::write_fmt::he666ca78eb4b8406
   3:        0x1028e6931 - std::sys::backtrace::print::h22721f9ab9a2749a
   4:        0x1028e9709 - std::panicking::default_hook::{{closure}}::h145e29ed875d8021
   5:        0x1028e948a - std::panicking::default_hook::h5d437c7e6bf0e3b5
   6:        0x10bb8147c - std[8efa578c02603ef9]::panicking::update_hook::<alloc[135510a28be92df]::boxed::Box<rustc_driver_impl[63f2171535a6fe49]::install_ice_hook::{closure#0}>>::{closure#0}
   7:        0x1028ea326 - std::panicking::rust_panic_with_hook::h6889093a56e48d04
   8:        0x1028e9b92 - std::panicking::begin_panic_handler::{{closure}}::hedafaff529964e0a
   9:        0x1028e7019 - std::sys::backtrace::__rust_end_short_backtrace::h15452907bf21f649
  10:        0x1028e989c - _rust_begin_unwind
  11:        0x10294d4aa - core::panicking::panic_fmt::hd76eb95c9d9ba8b3
  12:        0x10294d554 - core::panicking::panic::hb329c30fe2728c0f
  13:        0x10d86b18f - rustc_trait_selection[2bb3b73d2222b57e]::traits::outlives_bounds::implied_outlives_bounds
  14:        0x10bd69fe6 - <rustc_infer[48e5f050b52d2ea4]::infer::outlives::env::OutlivesEnvironment>::with_bounds::<core[9412a59d758dca42]::iter::adapters::flatten::FlatMap<indexmap[7c6524d62d8dc6cd]::set::iter::Iter<rustc_middle[4384e439927f71dd]::ty::Ty>, alloc[135510a28be92df]::vec::Vec<rustc_middle[4384e439927f71dd]::traits::query::OutlivesBound>, <rustc_infer[48e5f050b52d2ea4]::infer::InferCtxt as rustc_trait_selection[2bb3b73d2222b57e]::traits::outlives_bounds::InferCtxtExt>::implied_bounds_tys::{closure#0}>>
  15:        0x10be836d4 - rustc_hir_analysis[8e62bc6471a04889]::check::check::check_item_type
  16:        0x10beb64ae - rustc_hir_analysis[8e62bc6471a04889]::check::wfcheck::check_well_formed
  17:        0x10d21e86c - rustc_query_impl[a24e9023943e74ab]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[a24e9023943e74ab]::query_impl::check_well_formed::dynamic_query::{closure#2}::{closure#0}, rustc_middle[4384e439927f71dd]::query::erase::Erased<[u8; 1usize]>>
  18:        0x10d09701f - rustc_query_system[30bd0146b5104221]::query::plumbing::try_execute_query::<rustc_query_impl[a24e9023943e74ab]::DynamicConfig<rustc_query_system[30bd0146b5104221]::query::caches::VecCache<rustc_hir[ae2456c39d7f6170]::hir_id::OwnerId, rustc_middle[4384e439927f71dd]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[a24e9023943e74ab]::plumbing::QueryCtxt, false>
  19:        0x10d268280 - rustc_query_impl[a24e9023943e74ab]::query_impl::check_well_formed::get_query_non_incr::__rust_end_short_backtrace
  20:        0x10bdacba2 - rustc_middle[4384e439927f71dd]::query::plumbing::query_ensure_error_guaranteed::<rustc_query_system[30bd0146b5104221]::query::caches::VecCache<rustc_hir[ae2456c39d7f6170]::hir_id::OwnerId, rustc_middle[4384e439927f71dd]::query::erase::Erased<[u8; 1usize]>>, ()>
  21:        0x10bec4de1 - rustc_hir_analysis[8e62bc6471a04889]::check::wfcheck::check_mod_type_wf
  22:        0x10d21e83c - rustc_query_impl[a24e9023943e74ab]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[a24e9023943e74ab]::query_impl::check_mod_type_wf::dynamic_query::{closure#2}::{closure#0}, rustc_middle[4384e439927f71dd]::query::erase::Erased<[u8; 1usize]>>
  23:        0x10d04db79 - rustc_query_system[30bd0146b5104221]::query::plumbing::try_execute_query::<rustc_query_impl[a24e9023943e74ab]::DynamicConfig<rustc_query_system[30bd0146b5104221]::query::caches::DefaultCache<rustc_span[aed5394308446158]::def_id::LocalModDefId, rustc_middle[4384e439927f71dd]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[a24e9023943e74ab]::plumbing::QueryCtxt, false>
  24:        0x10d244ed0 - rustc_query_impl[a24e9023943e74ab]::query_impl::check_mod_type_wf::get_query_non_incr::__rust_end_short_backtrace
  25:        0x10bf4024c - rustc_hir_analysis[8e62bc6471a04889]::check_crate
  26:        0x10c4da6cb - rustc_interface[73216d77aad0c3a5]::passes::run_required_analyses
  27:        0x10c4dccb3 - rustc_interface[73216d77aad0c3a5]::passes::analysis
  28:        0x10d222dec - rustc_query_impl[a24e9023943e74ab]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[a24e9023943e74ab]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[4384e439927f71dd]::query::erase::Erased<[u8; 1usize]>>
  29:        0x10d00249e - rustc_query_system[30bd0146b5104221]::query::plumbing::try_execute_query::<rustc_query_impl[a24e9023943e74ab]::DynamicConfig<rustc_query_system[30bd0146b5104221]::query::caches::SingleCache<rustc_middle[4384e439927f71dd]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[a24e9023943e74ab]::plumbing::QueryCtxt, false>
  30:        0x10d22d307 - rustc_query_impl[a24e9023943e74ab]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  31:        0x10bb258d7 - <rustc_interface[73216d77aad0c3a5]::queries::QueryResult<&rustc_middle[4384e439927f71dd]::ty::context::GlobalCtxt>>::enter::<core[9412a59d758dca42]::result::Result<(), rustc_span[aed5394308446158]::ErrorGuaranteed>, rustc_driver_impl[63f2171535a6fe49]::run_compiler::{closure#0}::{closure#1}::{closure#3}>
  32:        0x10bb7fc94 - rustc_interface[73216d77aad0c3a5]::interface::run_compiler::<core[9412a59d758dca42]::result::Result<(), rustc_span[aed5394308446158]::ErrorGuaranteed>, rustc_driver_impl[63f2171535a6fe49]::run_compiler::{closure#0}>::{closure#1}
  33:        0x10bb6ec91 - std[8efa578c02603ef9]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[73216d77aad0c3a5]::util::run_in_thread_with_globals<rustc_interface[73216d77aad0c3a5]::util::run_in_thread_pool_with_globals<rustc_interface[73216d77aad0c3a5]::interface::run_compiler<core[9412a59d758dca42]::result::Result<(), rustc_span[aed5394308446158]::ErrorGuaranteed>, rustc_driver_impl[63f2171535a6fe49]::run_compiler::{closure#0}>::{closure#1}, core[9412a59d758dca42]::result::Result<(), rustc_span[aed5394308446158]::ErrorGuaranteed>>::{closure#0}, core[9412a59d758dca42]::result::Result<(), rustc_span[aed5394308446158]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[9412a59d758dca42]::result::Result<(), rustc_span[aed5394308446158]::ErrorGuaranteed>>
  34:        0x10bb8a3a6 - <<std[8efa578c02603ef9]::thread::Builder>::spawn_unchecked_<rustc_interface[73216d77aad0c3a5]::util::run_in_thread_with_globals<rustc_interface[73216d77aad0c3a5]::util::run_in_thread_pool_with_globals<rustc_interface[73216d77aad0c3a5]::interface::run_compiler<core[9412a59d758dca42]::result::Result<(), rustc_span[aed5394308446158]::ErrorGuaranteed>, rustc_driver_impl[63f2171535a6fe49]::run_compiler::{closure#0}>::{closure#1}, core[9412a59d758dca42]::result::Result<(), rustc_span[aed5394308446158]::ErrorGuaranteed>>::{closure#0}, core[9412a59d758dca42]::result::Result<(), rustc_span[aed5394308446158]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[9412a59d758dca42]::result::Result<(), rustc_span[aed5394308446158]::ErrorGuaranteed>>::{closure#2} as core[9412a59d758dca42]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  35:        0x1028f352b - std::sys::pal::unix::thread::Thread::new::thread_start::h68d49fa26efc1659
  36:     0x7ff801f5318b - __pthread_start

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: please make sure that you have updated to the latest nightly

note: please attach the file at `/Users/Documents/rustc-ice-2024-06-24-27021.txt` to your bug report

query stack during panic:
#0 [check_well_formed] checking that `<impl at ./BC86F.rs:9:1: 9:37>::bar::{opaque#0}` is well-formed
#1 [check_mod_type_wf] checking that types are well-formed in top-level module
end of query stack
error: aborting due to 2 previous errors

Some errors have detailed explanations: E0275, E0407.
For more information about an error, try `rustc --explain E0275`.

@oli-obk
Copy link
Contributor

oli-obk commented Jun 24, 2024

huh, did our bug-has-test test diverge from the original reproducer here? and thus we didn't notice it getting fixed?

@matthiaskrgr
Copy link
Member Author

The test got removed in d5bd4e2 🤔

@oli-obk
Copy link
Contributor

oli-obk commented Jun 24, 2024

yea, we really need some automation adding fixes #xxxxx or at least a bot message when a test gets removed telling the PR author to add that message.

@BoxyUwU
Copy link
Member

BoxyUwU commented Jun 24, 2024

I think I left this open because the underlying problem isn't fixed even if that exact case worked. I wrote a more detailed comment on the other issue.

I'm not really sure what the right thing to do is in cases like this where the bug in a crashes/*** test gets masked and starts passing but we need to make sure to keep tracking the fact that the compiler is broken.

It feels a bit wrong to mark a PR as fixing a bug when all it does is mask it

@matthiaskrgr
Copy link
Member Author

@oli-obk I've added bit of triabot cfg to #126413 , this is untested though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ S-bug-has-test Status: This bug is tracked inside the repo by a `known-bug` test. S-has-mcve Status: A Minimal Complete and Verifiable Example has been found for this issue T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
Status: Todo
Development

No branches or pull requests

7 participants