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.needs_infer() #112832

Closed
Marwes opened this issue Jun 20, 2023 · 5 comments · Fixed by #115559
Closed

ICE: assertion failed: !ty.needs_infer() #112832

Marwes opened this issue Jun 20, 2023 · 5 comments · Fixed by #115559
Assignees
Labels
C-bug Category: This is a bug. glacier ICE tracked in rust-lang/glacier. 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

@Marwes
Copy link
Contributor

Marwes commented Jun 20, 2023

I tried this code: (minimized)

pub trait QueryDb {
    type Db;
}

pub struct QueryTable<Q, DB> {
    db: DB,
    storage: Q,
}

impl<Q> QueryTable<Q, <Q as QueryDb>::Db> where Q: for<'d> AsyncQueryFunction<'d> {}

pub trait AsyncQueryFunction<'d>: QueryDb<Db = <Self as AsyncQueryFunction<'d>>::SendDb> {
    type SendDb: 'd;
}

pub trait QueryStorageOpsAsync<Q>
where
    Q: for<'d> AsyncQueryFunction<'d>,
{
}

fn main() {}

I expected to see this happen: It should compile as it does on rust 1.69 and earlier (or at least not ICE).

Instead, this happened: The program fails to compile with an ICE (see backtrace).

Meta

rustc --version --verbose:

rustc 1.70.0 (90c541806 2023-05-31)
binary: rustc
commit-hash: 90c541806f23a127002de5b4038be731ba1458ca
commit-date: 2023-05-31
host: x86_64-apple-darwin
release: 1.70.0
LLVM version: 16.0.2

cc gluon issue that reported this gluon-lang/gluon#951 (the error is coming from https://crates.io/crates/gluon-salsa, a fork of https://crates.io/crates/salsa)

Backtrace

[Running 'cargo check']
    Checking ice v0.1.0 (/Users/markus.westerlind/Code/ice)
thread 'rustc' panicked at 'assertion failed: !ty.needs_infer()', compiler/rustc_trait_selection/src/traits/outlives_bounds.rs:58:9
stack backtrace:
   0:        0x1065bcc66 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hae51cb91d407e2ef
   1:        0x10661c18b - core::fmt::write::h746bc0969202388b
   2:        0x1065b170c - std::io::Write::write_fmt::h4098c2c7437a0bd7
   3:        0x1065bca3a - std::sys_common::backtrace::print::h8360bf0158e89b36
   4:        0x1065bfc20 - std::panicking::default_hook::{{closure}}::hedf04c568eb6e0bc
   5:        0x1065bf9d0 - std::panicking::default_hook::h62889b2c29e2347d
   6:        0x1103b661a - rustc_driver_impl[eafeac5e4366564e]::DEFAULT_HOOK::{closure#0}::{closure#0}
   7:        0x1065c038a - std::panicking::rust_panic_with_hook::h22edd02828aff274
   8:        0x1065c00e3 - std::panicking::begin_panic_handler::{{closure}}::h6895f44a9b7e2caa
   9:        0x1065bd0a9 - std::sys_common::backtrace::__rust_end_short_backtrace::h013519e9b77978c5
  10:        0x1065bfe6d - _rust_begin_unwind
  11:        0x1066480d3 - core::panicking::panic_fmt::h2a51b60c12d11322
  12:        0x106648167 - core::panicking::panic::h00b4c20719c0abc2
  13:        0x111eb22a1 - <rustc_infer[8bdc2f06ca9271f6]::infer::InferCtxt as rustc_trait_selection[dd8d47d7dbab2993]::traits::outlives_bounds::InferCtxtExt>::implied_outlives_bounds
  14:        0x110661856 - <rustc_infer[8bdc2f06ca9271f6]::infer::outlives::env::OutlivesEnvironment>::with_bounds::<core[a404433b1679a212]::iter::adapters::flatten::FlatMap<indexmap[12aa5908c2e7a321]::set::IntoIter<rustc_middle[7fc0a978862eb49c]::ty::Ty>, alloc[c6d93a74176871ad]::vec::Vec<rustc_middle[7fc0a978862eb49c]::traits::query::OutlivesBound>, <rustc_infer[8bdc2f06ca9271f6]::infer::InferCtxt as rustc_trait_selection[dd8d47d7dbab2993]::traits::outlives_bounds::InferCtxtExt>::implied_bounds_tys::{closure#0}>>
  15:        0x11079a2dd - rustc_hir_analysis[24cefc37f6c5f787]::check::wfcheck::check_well_formed
  16:        0x1117e39b5 - <std[a8778ef3a639084b]::thread::local::LocalKey<core[a404433b1679a212]::cell::Cell<*const ()>>>::with::<rustc_middle[7fc0a978862eb49c]::ty::context::tls::enter_context<rustc_query_system[a65e9af7c6ae3d01]::query::plumbing::execute_job_incr<rustc_query_impl[598269a19ba1f561]::queries::check_well_formed, rustc_query_impl[598269a19ba1f561]::plumbing::QueryCtxt>::{closure#2}, (rustc_middle[7fc0a978862eb49c]::query::erase::Erased<[u8; 0usize]>, rustc_query_system[a65e9af7c6ae3d01]::dep_graph::graph::DepNodeIndex)>::{closure#0}, (rustc_middle[7fc0a978862eb49c]::query::erase::Erased<[u8; 0usize]>, rustc_query_system[a65e9af7c6ae3d01]::dep_graph::graph::DepNodeIndex)>
  17:        0x1116c58fd - rustc_query_system[a65e9af7c6ae3d01]::query::plumbing::try_execute_query::<rustc_query_impl[598269a19ba1f561]::queries::check_well_formed, rustc_query_impl[598269a19ba1f561]::plumbing::QueryCtxt>
  18:        0x1119a08be - <rustc_query_impl[598269a19ba1f561]::Queries as rustc_middle[7fc0a978862eb49c]::ty::query::QueryEngine>::check_well_formed
  19:        0x11078796b - rustc_data_structures[958e631f1985e39c]::sync::par_for_each_in::<&[rustc_hir[edfcb1a3e9db0f3e]::hir::ItemId], <rustc_middle[7fc0a978862eb49c]::hir::ModuleItems>::par_items<rustc_hir_analysis[24cefc37f6c5f787]::check::wfcheck::check_mod_type_wf::{closure#0}>::{closure#0}>
  20:        0x1107a0903 - rustc_hir_analysis[24cefc37f6c5f787]::check::wfcheck::check_mod_type_wf
  21:        0x1117e3045 - <std[a8778ef3a639084b]::thread::local::LocalKey<core[a404433b1679a212]::cell::Cell<*const ()>>>::with::<rustc_middle[7fc0a978862eb49c]::ty::context::tls::enter_context<rustc_query_system[a65e9af7c6ae3d01]::query::plumbing::execute_job_incr<rustc_query_impl[598269a19ba1f561]::queries::check_mod_type_wf, rustc_query_impl[598269a19ba1f561]::plumbing::QueryCtxt>::{closure#2}, (rustc_middle[7fc0a978862eb49c]::query::erase::Erased<[u8; 0usize]>, rustc_query_system[a65e9af7c6ae3d01]::dep_graph::graph::DepNodeIndex)>::{closure#0}, (rustc_middle[7fc0a978862eb49c]::query::erase::Erased<[u8; 0usize]>, rustc_query_system[a65e9af7c6ae3d01]::dep_graph::graph::DepNodeIndex)>
  22:        0x1116c509e - rustc_query_system[a65e9af7c6ae3d01]::query::plumbing::try_execute_query::<rustc_query_impl[598269a19ba1f561]::queries::check_mod_type_wf, rustc_query_impl[598269a19ba1f561]::plumbing::QueryCtxt>
  23:        0x1119935ce - <rustc_query_impl[598269a19ba1f561]::Queries as rustc_middle[7fc0a978862eb49c]::ty::query::QueryEngine>::check_mod_type_wf
  24:        0x110787a5b - rustc_data_structures[958e631f1985e39c]::sync::par_for_each_in::<&[rustc_hir[edfcb1a3e9db0f3e]::hir_id::OwnerId], <rustc_middle[7fc0a978862eb49c]::hir::map::Map>::par_for_each_module<rustc_hir_analysis[24cefc37f6c5f787]::check_crate::{closure#5}::{closure#0}::{closure#0}>::{closure#0}>
  25:        0x1106e7cad - <rustc_session[5be010f910a4943c]::session::Session>::track_errors::<rustc_hir_analysis[24cefc37f6c5f787]::check_crate::{closure#5}, ()>
  26:        0x110690b29 - rustc_hir_analysis[24cefc37f6c5f787]::check_crate
  27:        0x110c2a02d - rustc_interface[47617fbd5781a430]::passes::analysis
  28:        0x111865fdf - <std[a8778ef3a639084b]::thread::local::LocalKey<core[a404433b1679a212]::cell::Cell<*const ()>>>::with::<rustc_middle[7fc0a978862eb49c]::ty::context::tls::enter_context<rustc_query_system[a65e9af7c6ae3d01]::query::plumbing::execute_job_incr<rustc_query_impl[598269a19ba1f561]::queries::analysis, rustc_query_impl[598269a19ba1f561]::plumbing::QueryCtxt>::{closure#2}, (rustc_middle[7fc0a978862eb49c]::query::erase::Erased<[u8; 1usize]>, rustc_query_system[a65e9af7c6ae3d01]::dep_graph::graph::DepNodeIndex)>::{closure#0}, (rustc_middle[7fc0a978862eb49c]::query::erase::Erased<[u8; 1usize]>, rustc_query_system[a65e9af7c6ae3d01]::dep_graph::graph::DepNodeIndex)>
  29:        0x11172c33f - rustc_query_system[a65e9af7c6ae3d01]::query::plumbing::try_execute_query::<rustc_query_impl[598269a19ba1f561]::queries::analysis, rustc_query_impl[598269a19ba1f561]::plumbing::QueryCtxt>
  30:        0x111987046 - <rustc_query_impl[598269a19ba1f561]::Queries as rustc_middle[7fc0a978862eb49c]::ty::query::QueryEngine>::analysis
  31:        0x110406413 - <std[a8778ef3a639084b]::thread::local::LocalKey<core[a404433b1679a212]::cell::Cell<*const ()>>>::with::<rustc_middle[7fc0a978862eb49c]::ty::context::tls::enter_context<<rustc_middle[7fc0a978862eb49c]::ty::context::GlobalCtxt>::enter<rustc_driver_impl[eafeac5e4366564e]::run_compiler::{closure#1}::{closure#2}::{closure#4}, core[a404433b1679a212]::result::Result<(), rustc_span[8ca261ac2dfd0c4e]::ErrorGuaranteed>>::{closure#0}, core[a404433b1679a212]::result::Result<(), rustc_span[8ca261ac2dfd0c4e]::ErrorGuaranteed>>::{closure#0}, core[a404433b1679a212]::result::Result<(), rustc_span[8ca261ac2dfd0c4e]::ErrorGuaranteed>>
  32:        0x1103cc42c - <rustc_interface[47617fbd5781a430]::queries::QueryResult<&rustc_middle[7fc0a978862eb49c]::ty::context::GlobalCtxt>>::enter::<core[a404433b1679a212]::result::Result<(), rustc_span[8ca261ac2dfd0c4e]::ErrorGuaranteed>, rustc_driver_impl[eafeac5e4366564e]::run_compiler::{closure#1}::{closure#2}::{closure#4}>
  33:        0x11040d7b0 - <rustc_interface[47617fbd5781a430]::interface::Compiler>::enter::<rustc_driver_impl[eafeac5e4366564e]::run_compiler::{closure#1}::{closure#2}, core[a404433b1679a212]::result::Result<core[a404433b1679a212]::option::Option<rustc_interface[47617fbd5781a430]::queries::Linker>, rustc_span[8ca261ac2dfd0c4e]::ErrorGuaranteed>>
  34:        0x1103bd499 - rustc_span[8ca261ac2dfd0c4e]::set_source_map::<core[a404433b1679a212]::result::Result<(), rustc_span[8ca261ac2dfd0c4e]::ErrorGuaranteed>, rustc_interface[47617fbd5781a430]::interface::run_compiler<core[a404433b1679a212]::result::Result<(), rustc_span[8ca261ac2dfd0c4e]::ErrorGuaranteed>, rustc_driver_impl[eafeac5e4366564e]::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  35:        0x1103cd11d - <scoped_tls[74fa14b5599a25d8]::ScopedKey<rustc_span[8ca261ac2dfd0c4e]::SessionGlobals>>::set::<rustc_interface[47617fbd5781a430]::interface::run_compiler<core[a404433b1679a212]::result::Result<(), rustc_span[8ca261ac2dfd0c4e]::ErrorGuaranteed>, rustc_driver_impl[eafeac5e4366564e]::run_compiler::{closure#1}>::{closure#0}, core[a404433b1679a212]::result::Result<(), rustc_span[8ca261ac2dfd0c4e]::ErrorGuaranteed>>
  36:        0x1103c2930 - std[a8778ef3a639084b]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[47617fbd5781a430]::util::run_in_thread_pool_with_globals<rustc_interface[47617fbd5781a430]::interface::run_compiler<core[a404433b1679a212]::result::Result<(), rustc_span[8ca261ac2dfd0c4e]::ErrorGuaranteed>, rustc_driver_impl[eafeac5e4366564e]::run_compiler::{closure#1}>::{closure#0}, core[a404433b1679a212]::result::Result<(), rustc_span[8ca261ac2dfd0c4e]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[a404433b1679a212]::result::Result<(), rustc_span[8ca261ac2dfd0c4e]::ErrorGuaranteed>>
  37:        0x1103c2f75 - <<std[a8778ef3a639084b]::thread::Builder>::spawn_unchecked_<rustc_interface[47617fbd5781a430]::util::run_in_thread_pool_with_globals<rustc_interface[47617fbd5781a430]::interface::run_compiler<core[a404433b1679a212]::result::Result<(), rustc_span[8ca261ac2dfd0c4e]::ErrorGuaranteed>, rustc_driver_impl[eafeac5e4366564e]::run_compiler::{closure#1}>::{closure#0}, core[a404433b1679a212]::result::Result<(), rustc_span[8ca261ac2dfd0c4e]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[a404433b1679a212]::result::Result<(), rustc_span[8ca261ac2dfd0c4e]::ErrorGuaranteed>>::{closure#1} as core[a404433b1679a212]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  38:        0x1065c9ad9 - std::sys::unix::thread::Thread::new::thread_start::ha9b8d2206382b425
  39:     0x7ff803699259 - __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, I-ICE, T-compiler&template=ice.md

note: rustc 1.70.0 (90c541806 2023-05-31) running on x86_64-apple-darwin

note: compiler flags: --crate-type bin -C embed-bitcode=no -C split-debuginfo=unpacked -C debuginfo=2 -C incremental=[REDACTED]

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
#0 [check_well_formed] checking that `<impl at src/main.rs:10:1: 10:42>` 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: could not compile `ice` (bin "ice")
[Finished running. Exit status: 101]

@Marwes Marwes added the C-bug Category: This is a bug. label Jun 20, 2023
@KittyBorgX KittyBorgX added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Jun 20, 2023
@Noratrieb
Copy link
Member

searched nightlies: from nightly-2023-01-01 to nightly-2023-06-19
regressed nightly: nightly-2023-03-29
searched commit range: 2036fdd...478cbb4
regressed commit: 478cbb4

bisected with cargo-bisect-rustc v0.6.6

Host triple: x86_64-unknown-linux-gnu
Reproduce with:

cargo bisect-rustc 2023-01-01 --end 2023-06-19 --access github

@Noratrieb Noratrieb added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jun 20, 2023
@Noratrieb
Copy link
Member

probably #102472 or #109629 @lcnr @aliemjay

@aliemjay aliemjay self-assigned this Jun 20, 2023
@lqd
Copy link
Member

lqd commented Jun 20, 2023

#109629 has a dfa82e8833199efd2cc0114fed03eab53614a221 try build and it does reproduce the issue.

@rust-lang-glacier-bot rust-lang-glacier-bot added the glacier ICE tracked in rust-lang/glacier. label Jul 14, 2023
@Snarpix
Copy link

Snarpix commented Aug 29, 2023

The issue still persists on rust 1.72.
I have tried to compile example that was provided by author of issue:
rustc --version --verbose

rustc 1.72.0 (5680fa18f 2023-08-23)
binary: rustc
commit-hash: 5680fa18feaa87f3ff04063800aec256c3d4b4be
commit-date: 2023-08-23
host: x86_64-unknown-linux-gnu
release: 1.72.0
LLVM version: 16.0.5
Error log
warning: fields `db` and `storage` are never read
 --> test.rs:6:5
  |
5 | pub struct QueryTable<Q, DB> {
  |            ---------- fields in this struct
6 |     db: DB,
  |     ^^
7 |     storage: Q,
  |     ^^^^^^^
  |
  = note: `#[warn(dead_code)]` on by default

error: internal compiler error: no errors encountered even though `delay_span_bug` issued

error: internal compiler error: skipped implied_outlives_bounds due to unconstrained lifetimes
  --> test.rs:10:1
   |
10 | impl<Q> QueryTable<Q, <Q as QueryDb>::Db> where Q: for<'d> AsyncQueryFunction<'d> {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: delayed at compiler/rustc_trait_selection/src/traits/outlives_bounds.rs:64:27
              0: <rustc_errors::HandlerInner>::emit_diagnostic
              1: <rustc_errors::Handler>::delay_span_bug::<rustc_span::span_encoding::Span, &str>
              2: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::outlives_bounds::InferCtxtExt>::implied_outlives_bounds
              3: <rustc_infer::infer::outlives::env::OutlivesEnvironment>::with_bounds::<core::iter::adapters::flatten::FlatMap<indexmap::set::iter::IntoIter<rustc_middle::ty::Ty>, alloc::vec::Vec<rustc_middle::traits::query::OutlivesBound>, <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::outlives_bounds::InferCtxtExt>::implied_bounds_tys::{closure#0}>>
              4: rustc_hir_analysis::check::wfcheck::check_well_formed
              5: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::check_well_formed::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 0]>>
              6: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::VecCache<rustc_hir::hir_id::OwnerId, rustc_middle::query::erase::Erased<[u8; 0]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
              7: rustc_query_impl::query_impl::check_well_formed::get_query_non_incr::__rust_end_short_backtrace
              8: rustc_data_structures::sync::par_for_each_in::<&[rustc_hir::hir::ImplItemId], <rustc_middle::hir::ModuleItems>::par_impl_items<rustc_hir_analysis::check::wfcheck::check_mod_type_wf::{closure#1}>::{closure#0}>
              9: rustc_hir_analysis::check::wfcheck::check_mod_type_wf
             10: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::check_mod_type_wf::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 0]>>
             11: <rustc_query_impl::query_impl::check_mod_type_wf::dynamic_query::{closure#2} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_span::def_id::LocalDefId)>>::call_once
             12: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 0]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
             13: rustc_query_impl::query_impl::check_mod_type_wf::get_query_non_incr::__rust_end_short_backtrace
             14: rustc_data_structures::sync::par_for_each_in::<&[rustc_hir::hir_id::OwnerId], <rustc_middle::hir::map::Map>::par_for_each_module<rustc_hir_analysis::check_crate::{closure#5}::{closure#0}::{closure#0}>::{closure#0}>
             15: <rustc_session::session::Session>::track_errors::<rustc_hir_analysis::check_crate::{closure#5}, ()>
             16: rustc_hir_analysis::check_crate
             17: rustc_interface::passes::analysis
             18: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 1]>>
             19: <rustc_query_impl::query_impl::analysis::dynamic_query::{closure#2} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, ())>>::call_once
             20: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 1]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
             21: rustc_query_impl::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
             22: <rustc_interface::queries::QueryResult<&rustc_middle::ty::context::GlobalCtxt>>::enter::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}::{closure#2}::{closure#4}>
             23: <rustc_interface::interface::Compiler>::enter::<rustc_driver_impl::run_compiler::{closure#1}::{closure#2}, core::result::Result<core::option::Option<rustc_interface::queries::Linker>, rustc_span::ErrorGuaranteed>>
             24: rustc_span::set_source_map::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
             25: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
             26: std::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
             27: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
             28: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
                        at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/alloc/src/boxed.rs:1993:9
             29: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
                        at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/alloc/src/boxed.rs:1993:9
             30: std::sys::unix::thread::Thread::new::thread_start
                        at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/sys/unix/thread.rs:108:17
             31: <unknown>
             32: <unknown>
           

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug, I-ICE, T-compiler&template=ice.md

note: rustc 1.72.0 (5680fa18f 2023-08-23) running on x86_64-unknown-linux-gnu

query stack during panic:
end of query stack
error: aborting due to 2 previous errors; 1 warning emitted

I have tried to fix compilation issue in gluon_salsa by explicitly specifying lifetimes, but I have ran into ICE.

@rowanfr
Copy link

rowanfr commented Sep 4, 2023

I enjoy using gluon and would really like for this to be solved to enable using it with the current compiler. Hopefully this helps

@lcnr lcnr added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Sep 4, 2023
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this issue Sep 5, 2023
… r=aliemjay

implied bounds: do not ICE on unconstrained region vars

fixes rust-lang#112832

see tests/ui/implied-bounds/implied-bounds-unconstrained-2.rs for a minimal example showing why this is necessary.

r? types

cc `@compiler-errors` `@aliemjay` https://rust-lang.zulipchat.com/#narrow/stream/144729-t-types/topic/assoc.20type.20bound.20in.20super.20trait
@bors bors closed this as completed in 8c04907 Sep 5, 2023
@apiraino apiraino removed the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Sep 7, 2023
Marwes added a commit to gluon-lang/gluon that referenced this issue Dec 16, 2023
The ICE has been fixed so we can restore stable compilation again.

rust-lang/rust#112832
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. glacier ICE tracked in rust-lang/glacier. 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.

10 participants