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 delay_span_bug #102964

Closed
NoNaim95 opened this issue Oct 12, 2022 · 6 comments · Fixed by #102967
Closed

ICE delay_span_bug #102964

NoNaim95 opened this issue Oct 12, 2022 · 6 comments · Fixed by #102967
Assignees
Labels
C-bug Category: This is a bug. E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been 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.

Comments

@NoNaim95
Copy link

NoNaim95 commented Oct 12, 2022

Code

use std::rc::Rc;
type Foo<'a, T> = &'a dyn Fn(&T);
type RcFoo<'a, T> = Rc<Foo<'a, T>>;

fn bar_function<T>(function: Foo<T>) -> RcFoo<T>{
    let rc = Rc::new(function);
}
fn main() {}

Meta

rustc --version --verbose:

rustc 1.65.0-beta.3 (da7ffa2d1 2022-10-10)
binary: rustc
commit-hash: da7ffa2d1df2daf747b8e4bdf5659c942abb22af
commit-date: 2022-10-10
host: x86_64-unknown-linux-gnu
release: 1.65.0-beta.3
LLVM version: 15.0.0

Error output

thread 'rustc' panicked at 'assertion failed: !value.has_escaping_bound_vars()', /rustc/da7ffa2d1df2daf747b8e4bdf5659c942abb22af/compiler/rustc_middle/src/ty/sty.rs:1038:9
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.65.0-beta.3 (da7ffa2d1 2022-10-10) running on x86_64-unknown-linux-gnu

query stack during panic:
#0 [typeck] type-checking `bar_function`
#1 [typeck_item_bodies] type-checking all item bodies
end of query stack
error: internal compiler error: no errors encountered even though `delay_span_bug` issued

error: internal compiler error: `InferCtxt` incorrectly tainted by errors
  |
  = note: delayed at compiler/rustc_infer/src/infer/mod.rs:1281:27

thread 'rustc' panicked at 'Box<dyn Any>', compiler/rustc_errors/src/lib.rs:1496:13
stack backtrace:
   0:     0x7f06b736ec90 - std::backtrace_rs::backtrace::libunwind::trace::h6fef376b0cad02a6
                               at /rustc/da7ffa2d1df2daf747b8e4bdf5659c942abb22af/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   1:     0x7f06b736ec90 - std::backtrace_rs::backtrace::trace_unsynchronized::hc3fd5403662df331
                               at /rustc/da7ffa2d1df2daf747b8e4bdf5659c942abb22af/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f06b736ec90 - std::sys_common::backtrace::_print_fmt::h297509164be93106
                               at /rustc/da7ffa2d1df2daf747b8e4bdf5659c942abb22af/library/std/src/sys_common/backtrace.rs:66:5
   3:     0x7f06b736ec90 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h79d6bcaf77809e1c
                               at /rustc/da7ffa2d1df2daf747b8e4bdf5659c942abb22af/library/std/src/sys_common/backtrace.rs:45:22
   4:     0x7f06b73c99ee - core::fmt::write::hee06f0b868172576
                               at /rustc/da7ffa2d1df2daf747b8e4bdf5659c942abb22af/library/core/src/fmt/mod.rs:1202:17
   5:     0x7f06b735f8a5 - std::io::Write::write_fmt::hd0f76b4a4749cb45
                               at /rustc/da7ffa2d1df2daf747b8e4bdf5659c942abb22af/library/std/src/io/mod.rs:1679:15
   6:     0x7f06b7371943 - std::sys_common::backtrace::_print::h08c136767f88fd2c
                               at /rustc/da7ffa2d1df2daf747b8e4bdf5659c942abb22af/library/std/src/sys_common/backtrace.rs:48:5
   7:     0x7f06b7371943 - std::sys_common::backtrace::print::hdeab272468b75cae
                               at /rustc/da7ffa2d1df2daf747b8e4bdf5659c942abb22af/library/std/src/sys_common/backtrace.rs:35:9
   8:     0x7f06b7371943 - std::panicking::default_hook::{{closure}}::ha44dc2e8c33ccbcc
                               at /rustc/da7ffa2d1df2daf747b8e4bdf5659c942abb22af/library/std/src/panicking.rs:295:22
   9:     0x7f06b737162f - std::panicking::default_hook::hb070996f96b0a3b5
                               at /rustc/da7ffa2d1df2daf747b8e4bdf5659c942abb22af/library/std/src/panicking.rs:314:9
  10:     0x7f06b9b96bf1 - <rustc_driver[ac9e70efe585eaf7]::DEFAULT_HOOK::{closure#0}::{closure#0} as core[80f0eae6936f6ff0]::ops::function::FnOnce<(&core[80f0eae6936f6ff0]::panic::panic_info::PanicInfo,)>>::call_once::{shim:vtable#0}
  11:     0x7f06b737217d - std::panicking::rust_panic_with_hook::he727314f57fb38a7
                               at /rustc/da7ffa2d1df2daf747b8e4bdf5659c942abb22af/library/std/src/panicking.rs:702:17
  12:     0x7f06baca7a31 - std[8621e7c00f2a8dca]::panicking::begin_panic::<rustc_errors[dc2f622695deda25]::ExplicitBug>::{closure#0}
  13:     0x7f06baca7556 - std[8621e7c00f2a8dca]::sys_common::backtrace::__rust_end_short_backtrace::<std[8621e7c00f2a8dca]::panicking::begin_panic<rustc_errors[dc2f622695deda25]::ExplicitBug>::{closure#0}, !>
  14:     0x7f06baca7516 - std[8621e7c00f2a8dca]::panicking::begin_panic::<rustc_errors[dc2f622695deda25]::ExplicitBug>
  15:     0x7f06baca52e6 - std[8621e7c00f2a8dca]::panic::panic_any::<rustc_errors[dc2f622695deda25]::ExplicitBug>
  16:     0x7f06b96d6228 - <rustc_errors[dc2f622695deda25]::HandlerInner as core[80f0eae6936f6ff0]::ops::drop::Drop>::drop
  17:     0x7f06b896f898 - core[80f0eae6936f6ff0]::ptr::drop_in_place::<rustc_session[8222e471c058bbf3]::parse::ParseSess>
  18:     0x7f06b892d338 - <alloc[ff0994a5c6a37d30]::rc::Rc<rustc_session[8222e471c058bbf3]::session::Session> as core[80f0eae6936f6ff0]::ops::drop::Drop>::drop
  19:     0x7f06b892a2fd - core[80f0eae6936f6ff0]::ptr::drop_in_place::<rustc_interface[eb48c34dc90baf77]::interface::Compiler>
  20:     0x7f06b8928571 - rustc_interface[eb48c34dc90baf77]::interface::create_compiler_and_run::<core[80f0eae6936f6ff0]::result::Result<(), rustc_errors[dc2f622695deda25]::ErrorGuaranteed>, rustc_driver[ac9e70efe585eaf7]::run_compiler::{closure#1}>
  21:     0x7f06b8926061 - <scoped_tls[5cfd4801cfe9209]::ScopedKey<rustc_span[f89eeddc3db63117]::SessionGlobals>>::set::<rustc_interface[eb48c34dc90baf77]::interface::run_compiler<core[80f0eae6936f6ff0]::result::Result<(), rustc_errors[dc2f622695deda25]::ErrorGuaranteed>, rustc_driver[ac9e70efe585eaf7]::run_compiler::{closure#1}>::{closure#0}, core[80f0eae6936f6ff0]::result::Result<(), rustc_errors[dc2f622695deda25]::ErrorGuaranteed>>
  22:     0x7f06b8925d4f - std[8621e7c00f2a8dca]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[eb48c34dc90baf77]::util::run_in_thread_pool_with_globals<rustc_interface[eb48c34dc90baf77]::interface::run_compiler<core[80f0eae6936f6ff0]::result::Result<(), rustc_errors[dc2f622695deda25]::ErrorGuaranteed>, rustc_driver[ac9e70efe585eaf7]::run_compiler::{closure#1}>::{closure#0}, core[80f0eae6936f6ff0]::result::Result<(), rustc_errors[dc2f622695deda25]::ErrorGuaranteed>>::{closure#0}, core[80f0eae6936f6ff0]::result::Result<(), rustc_errors[dc2f622695deda25]::ErrorGuaranteed>>
  23:     0x7f06b99f2d90 - <<std[8621e7c00f2a8dca]::thread::Builder>::spawn_unchecked_<rustc_interface[eb48c34dc90baf77]::util::run_in_thread_pool_with_globals<rustc_interface[eb48c34dc90baf77]::interface::run_compiler<core[80f0eae6936f6ff0]::result::Result<(), rustc_errors[dc2f622695deda25]::ErrorGuaranteed>, rustc_driver[ac9e70efe585eaf7]::run_compiler::{closure#1}>::{closure#0}, core[80f0eae6936f6ff0]::result::Result<(), rustc_errors[dc2f622695deda25]::ErrorGuaranteed>>::{closure#0}, core[80f0eae6936f6ff0]::result::Result<(), rustc_errors[dc2f622695deda25]::ErrorGuaranteed>>::{closure#1} as core[80f0eae6936f6ff0]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  24:     0x7f06b737bf53 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h6a88cd656aa4a16f
                               at /rustc/da7ffa2d1df2daf747b8e4bdf5659c942abb22af/library/alloc/src/boxed.rs:1940:9
  25:     0x7f06b737bf53 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h4501efe38c2b4412
                               at /rustc/da7ffa2d1df2daf747b8e4bdf5659c942abb22af/library/alloc/src/boxed.rs:1940:9
  26:     0x7f06b737bf53 - std::sys::unix::thread::Thread::new::thread_start::h67e5c6aa03c98308
                               at /rustc/da7ffa2d1df2daf747b8e4bdf5659c942abb22af/library/std/src/sys/unix/thread.rs:108:17
  27:     0x7f06b711d74d - <unknown>
  28:     0x7f06b719f700 - <unknown>
  29:                0x0 - <unknown>

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.65.0-beta.3 (da7ffa2d1 2022-10-10) running on x86_64-unknown-linux-gnu

query stack during panic:
end of query stack
thread panicked while panicking. aborting.
zsh: IOT instruction (core dumped)  RUST_BACKTRACE=0 rustc src/main.rs
Backtrace

thread 'rustc' panicked at 'assertion failed: !value.has_escaping_bound_vars()', /rustc/da7ffa2d1df2daf747b8e4bdf5659c942abb22af/compiler/rustc_middle/src/ty/sty.rs:1038:9
stack backtrace:
   0: rust_begin_unwind
             at /rustc/da7ffa2d1df2daf747b8e4bdf5659c942abb22af/library/std/src/panicking.rs:584:5
   1: core::panicking::panic_fmt
             at /rustc/da7ffa2d1df2daf747b8e4bdf5659c942abb22af/library/core/src/panicking.rs:142:14
   2: core::panicking::panic
             at /rustc/da7ffa2d1df2daf747b8e4bdf5659c942abb22af/library/core/src/panicking.rs:48:5
   3: <rustc_middle::ty::sty::Binder<rustc_middle::ty::sty::ExistentialTraitRef>>::dummy
   4: <rustc_infer::infer::error_reporting::SameTypeModuloInfer as rustc_middle::ty::relate::TypeRelation>::binders::<rustc_middle::ty::sty::ExistentialTraitRef>
   5: <rustc_infer::infer::error_reporting::SameTypeModuloInfer as rustc_middle::ty::relate::TypeRelation>::relate::<rustc_middle::ty::sty::Binder<rustc_middle::ty::sty::ExistentialTraitRef>>
   6: <&mut <&rustc_middle::ty::list::List<rustc_middle::ty::sty::Binder<rustc_middle::ty::sty::ExistentialPredicate>> as rustc_middle::ty::relate::Relate>::relate<rustc_infer::infer::error_reporting::SameTypeModuloInfer>::{closure#2} as core::ops::function::FnOnce<((rustc_middle::ty::sty::Binder<rustc_middle::ty::sty::ExistentialPredicate>, rustc_middle::ty::sty::Binder<rustc_middle::ty::sty::ExistentialPredicate>),)>>::call_once
   7: <core::result::Result<rustc_middle::ty::sty::Binder<rustc_middle::ty::sty::ExistentialPredicate>, rustc_middle::ty::error::TypeError> as rustc_type_ir::InternIteratorElement<rustc_middle::ty::sty::Binder<rustc_middle::ty::sty::ExistentialPredicate>, &rustc_middle::ty::list::List<rustc_middle::ty::sty::Binder<rustc_middle::ty::sty::ExistentialPredicate>>>>::intern_with::<core::iter::adapters::map::Map<core::iter::adapters::zip::Zip<alloc::vec::into_iter::IntoIter<rustc_middle::ty::sty::Binder<rustc_middle::ty::sty::ExistentialPredicate>>, alloc::vec::into_iter::IntoIter<rustc_middle::ty::sty::Binder<rustc_middle::ty::sty::ExistentialPredicate>>>, <&rustc_middle::ty::list::List<rustc_middle::ty::sty::Binder<rustc_middle::ty::sty::ExistentialPredicate>> as rustc_middle::ty::relate::Relate>::relate<rustc_infer::infer::error_reporting::SameTypeModuloInfer>::{closure#2}>, <rustc_middle::ty::context::TyCtxt>::mk_poly_existential_predicates<core::iter::adapters::map::Map<core::iter::adapters::zip::Zip<alloc::vec::into_iter::IntoIter<rustc_middle::ty::sty::Binder<rustc_middle::ty::sty::ExistentialPredicate>>, alloc::vec::into_iter::IntoIter<rustc_middle::ty::sty::Binder<rustc_middle::ty::sty::ExistentialPredicate>>>, <&rustc_middle::ty::list::List<rustc_middle::ty::sty::Binder<rustc_middle::ty::sty::ExistentialPredicate>> as rustc_middle::ty::relate::Relate>::relate<rustc_infer::infer::error_reporting::SameTypeModuloInfer>::{closure#2}>>::{closure#0}>
   8: <&rustc_middle::ty::list::List<rustc_middle::ty::sty::Binder<rustc_middle::ty::sty::ExistentialPredicate>> as rustc_middle::ty::relate::Relate>::relate::<rustc_infer::infer::error_reporting::SameTypeModuloInfer>
   9: rustc_middle::ty::relate::super_relate_tys::<rustc_infer::infer::error_reporting::SameTypeModuloInfer>
  10: <rustc_infer::infer::error_reporting::SameTypeModuloInfer as rustc_middle::ty::relate::TypeRelation>::tys
  11: rustc_middle::ty::relate::super_relate_tys::<rustc_infer::infer::error_reporting::SameTypeModuloInfer>
  12: <rustc_infer::infer::error_reporting::SameTypeModuloInfer as rustc_middle::ty::relate::TypeRelation>::tys
  13: <rustc_middle::ty::subst::GenericArg as rustc_middle::ty::relate::Relate>::relate::<rustc_infer::infer::error_reporting::SameTypeModuloInfer>
  14: <&mut rustc_middle::ty::relate::relate_substs_with_variances<rustc_infer::infer::error_reporting::SameTypeModuloInfer>::{closure#0} as core::ops::function::FnOnce<((usize, (rustc_middle::ty::subst::GenericArg, rustc_middle::ty::subst::GenericArg)),)>>::call_once
  15: <core::result::Result<rustc_middle::ty::subst::GenericArg, rustc_middle::ty::error::TypeError> as rustc_type_ir::InternIteratorElement<rustc_middle::ty::subst::GenericArg, &rustc_middle::ty::list::List<rustc_middle::ty::subst::GenericArg>>>::intern_with::<core::iter::adapters::map::Map<core::iter::adapters::enumerate::Enumerate<core::iter::adapters::zip::Zip<core::iter::adapters::copied::Copied<core::slice::iter::Iter<rustc_middle::ty::subst::GenericArg>>, core::iter::adapters::copied::Copied<core::slice::iter::Iter<rustc_middle::ty::subst::GenericArg>>>>, rustc_middle::ty::relate::relate_substs_with_variances<rustc_infer::infer::error_reporting::SameTypeModuloInfer>::{closure#0}>, <rustc_middle::ty::context::TyCtxt>::mk_substs<core::iter::adapters::map::Map<core::iter::adapters::enumerate::Enumerate<core::iter::adapters::zip::Zip<core::iter::adapters::copied::Copied<core::slice::iter::Iter<rustc_middle::ty::subst::GenericArg>>, core::iter::adapters::copied::Copied<core::slice::iter::Iter<rustc_middle::ty::subst::GenericArg>>>>, rustc_middle::ty::relate::relate_substs_with_variances<rustc_infer::infer::error_reporting::SameTypeModuloInfer>::{closure#0}>>::{closure#0}>
  16: rustc_middle::ty::relate::relate_substs_with_variances::<rustc_infer::infer::error_reporting::SameTypeModuloInfer>
  17: <rustc_infer::infer::error_reporting::SameTypeModuloInfer as rustc_middle::ty::relate::TypeRelation>::relate_item_substs
  18: rustc_middle::ty::relate::super_relate_tys::<rustc_infer::infer::error_reporting::SameTypeModuloInfer>
  19: <rustc_infer::infer::error_reporting::SameTypeModuloInfer as rustc_middle::ty::relate::TypeRelation>::tys
  20: <rustc_infer::infer::InferCtxt>::same_type_modulo_infer
  21: <rustc_hir::hir::Pat>::walk_::<&mut <rustc_infer::infer::InferCtxt>::consider_returning_binding::{closure#0}>
  22: <rustc_infer::infer::InferCtxt>::consider_returning_binding
  23: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_block_with_expected::{closure#0}::{closure#2}
  24: <rustc_typeck::check::coercion::CoerceMany<&rustc_hir::hir::Expr>>::coerce_forced_unit
  25: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_block_with_expected
  26: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  27: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_return_expr
  28: rustc_typeck::check::check::check_fn
  29: <rustc_infer::infer::InferCtxtBuilder>::enter::<&rustc_middle::ty::context::TypeckResults, <rustc_typeck::check::inherited::InheritedBuilder>::enter<rustc_typeck::check::typeck_with_fallback<rustc_typeck::check::typeck::{closure#0}>::{closure#1}, &rustc_middle::ty::context::TypeckResults>::{closure#0}>
  30: rustc_typeck::check::typeck
  31: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<rustc_span::def_id::LocalDefId, &rustc_middle::ty::context::TypeckResults>>
  32: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::typeck
  33: rustc_data_structures::sync::par_for_each_in::<&[rustc_span::def_id::LocalDefId], <rustc_middle::hir::map::Map>::par_body_owners<rustc_typeck::check::typeck_item_bodies::{closure#0}>::{closure#0}>
  34: rustc_typeck::check::typeck_item_bodies
  35: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<(), ()>>
  36: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::typeck_item_bodies, rustc_query_impl::plumbing::QueryCtxt>
  37: <rustc_session::session::Session>::time::<(), rustc_typeck::check_crate::{closure#7}>
  38: rustc_typeck::check_crate
  39: rustc_interface::passes::analysis
  40: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<(), core::result::Result<(), rustc_errors::ErrorGuaranteed>>>
  41: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::analysis, rustc_query_impl::plumbing::QueryCtxt>
  42: <rustc_interface::passes::QueryContext>::enter::<rustc_driver::run_compiler::{closure#1}::{closure#2}::{closure#3}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
  43: rustc_interface::interface::create_compiler_and_run::<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>
  44: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
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.65.0-beta.3 (da7ffa2d1 2022-10-10) running on x86_64-unknown-linux-gnu

query stack during panic:
#0 [typeck] type-checking `bar_function`
#1 [typeck_item_bodies] type-checking all item bodies
#2 [analysis] running analysis passes on this crate
end of query stack
error: internal compiler error: no errors encountered even though `delay_span_bug` issued

error: internal compiler error: `InferCtxt` incorrectly tainted by errors
  |
  = note: delayed at compiler/rustc_infer/src/infer/mod.rs:1281:27

thread 'rustc' panicked at 'Box<dyn Any>', compiler/rustc_errors/src/lib.rs:1496:13
stack backtrace:
   0:     0x7f6c16f6ec90 - std::backtrace_rs::backtrace::libunwind::trace::h6fef376b0cad02a6
                               at /rustc/da7ffa2d1df2daf747b8e4bdf5659c942abb22af/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   1:     0x7f6c16f6ec90 - std::backtrace_rs::backtrace::trace_unsynchronized::hc3fd5403662df331
                               at /rustc/da7ffa2d1df2daf747b8e4bdf5659c942abb22af/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f6c16f6ec90 - std::sys_common::backtrace::_print_fmt::h297509164be93106
                               at /rustc/da7ffa2d1df2daf747b8e4bdf5659c942abb22af/library/std/src/sys_common/backtrace.rs:66:5
   3:     0x7f6c16f6ec90 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h79d6bcaf77809e1c
                               at /rustc/da7ffa2d1df2daf747b8e4bdf5659c942abb22af/library/std/src/sys_common/backtrace.rs:45:22
   4:     0x7f6c16fc99ee - core::fmt::write::hee06f0b868172576
                               at /rustc/da7ffa2d1df2daf747b8e4bdf5659c942abb22af/library/core/src/fmt/mod.rs:1202:17
   5:     0x7f6c16f5f8a5 - std::io::Write::write_fmt::hd0f76b4a4749cb45
                               at /rustc/da7ffa2d1df2daf747b8e4bdf5659c942abb22af/library/std/src/io/mod.rs:1679:15
   6:     0x7f6c16f71943 - std::sys_common::backtrace::_print::h08c136767f88fd2c
                               at /rustc/da7ffa2d1df2daf747b8e4bdf5659c942abb22af/library/std/src/sys_common/backtrace.rs:48:5
   7:     0x7f6c16f71943 - std::sys_common::backtrace::print::hdeab272468b75cae
                               at /rustc/da7ffa2d1df2daf747b8e4bdf5659c942abb22af/library/std/src/sys_common/backtrace.rs:35:9
   8:     0x7f6c16f71943 - std::panicking::default_hook::{{closure}}::ha44dc2e8c33ccbcc
                               at /rustc/da7ffa2d1df2daf747b8e4bdf5659c942abb22af/library/std/src/panicking.rs:295:22
   9:     0x7f6c16f7162f - std::panicking::default_hook::hb070996f96b0a3b5
                               at /rustc/da7ffa2d1df2daf747b8e4bdf5659c942abb22af/library/std/src/panicking.rs:314:9
  10:     0x7f6c19796bf1 - <rustc_driver[ac9e70efe585eaf7]::DEFAULT_HOOK::{closure#0}::{closure#0} as core[80f0eae6936f6ff0]::ops::function::FnOnce<(&core[80f0eae6936f6ff0]::panic::panic_info::PanicInfo,)>>::call_once::{shim:vtable#0}
  11:     0x7f6c16f7217d - std::panicking::rust_panic_with_hook::he727314f57fb38a7
                               at /rustc/da7ffa2d1df2daf747b8e4bdf5659c942abb22af/library/std/src/panicking.rs:702:17
  12:     0x7f6c1a8a7a31 - std[8621e7c00f2a8dca]::panicking::begin_panic::<rustc_errors[dc2f622695deda25]::ExplicitBug>::{closure#0}
  13:     0x7f6c1a8a7556 - std[8621e7c00f2a8dca]::sys_common::backtrace::__rust_end_short_backtrace::<std[8621e7c00f2a8dca]::panicking::begin_panic<rustc_errors[dc2f622695deda25]::ExplicitBug>::{closure#0}, !>
  14:     0x7f6c1a8a7516 - std[8621e7c00f2a8dca]::panicking::begin_panic::<rustc_errors[dc2f622695deda25]::ExplicitBug>
  15:     0x7f6c1a8a52e6 - std[8621e7c00f2a8dca]::panic::panic_any::<rustc_errors[dc2f622695deda25]::ExplicitBug>
  16:     0x7f6c192d6228 - <rustc_errors[dc2f622695deda25]::HandlerInner as core[80f0eae6936f6ff0]::ops::drop::Drop>::drop
  17:     0x7f6c1856f898 - core[80f0eae6936f6ff0]::ptr::drop_in_place::<rustc_session[8222e471c058bbf3]::parse::ParseSess>
  18:     0x7f6c1852d338 - <alloc[ff0994a5c6a37d30]::rc::Rc<rustc_session[8222e471c058bbf3]::session::Session> as core[80f0eae6936f6ff0]::ops::drop::Drop>::drop
  19:     0x7f6c1852a2fd - core[80f0eae6936f6ff0]::ptr::drop_in_place::<rustc_interface[eb48c34dc90baf77]::interface::Compiler>
  20:     0x7f6c18528571 - rustc_interface[eb48c34dc90baf77]::interface::create_compiler_and_run::<core[80f0eae6936f6ff0]::result::Result<(), rustc_errors[dc2f622695deda25]::ErrorGuaranteed>, rustc_driver[ac9e70efe585eaf7]::run_compiler::{closure#1}>
  21:     0x7f6c18526061 - <scoped_tls[5cfd4801cfe9209]::ScopedKey<rustc_span[f89eeddc3db63117]::SessionGlobals>>::set::<rustc_interface[eb48c34dc90baf77]::interface::run_compiler<core[80f0eae6936f6ff0]::result::Result<(), rustc_errors[dc2f622695deda25]::ErrorGuaranteed>, rustc_driver[ac9e70efe585eaf7]::run_compiler::{closure#1}>::{closure#0}, core[80f0eae6936f6ff0]::result::Result<(), rustc_errors[dc2f622695deda25]::ErrorGuaranteed>>
  22:     0x7f6c18525d4f - std[8621e7c00f2a8dca]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[eb48c34dc90baf77]::util::run_in_thread_pool_with_globals<rustc_interface[eb48c34dc90baf77]::interface::run_compiler<core[80f0eae6936f6ff0]::result::Result<(), rustc_errors[dc2f622695deda25]::ErrorGuaranteed>, rustc_driver[ac9e70efe585eaf7]::run_compiler::{closure#1}>::{closure#0}, core[80f0eae6936f6ff0]::result::Result<(), rustc_errors[dc2f622695deda25]::ErrorGuaranteed>>::{closure#0}, core[80f0eae6936f6ff0]::result::Result<(), rustc_errors[dc2f622695deda25]::ErrorGuaranteed>>
  23:     0x7f6c195f2d90 - <<std[8621e7c00f2a8dca]::thread::Builder>::spawn_unchecked_<rustc_interface[eb48c34dc90baf77]::util::run_in_thread_pool_with_globals<rustc_interface[eb48c34dc90baf77]::interface::run_compiler<core[80f0eae6936f6ff0]::result::Result<(), rustc_errors[dc2f622695deda25]::ErrorGuaranteed>, rustc_driver[ac9e70efe585eaf7]::run_compiler::{closure#1}>::{closure#0}, core[80f0eae6936f6ff0]::result::Result<(), rustc_errors[dc2f622695deda25]::ErrorGuaranteed>>::{closure#0}, core[80f0eae6936f6ff0]::result::Result<(), rustc_errors[dc2f622695deda25]::ErrorGuaranteed>>::{closure#1} as core[80f0eae6936f6ff0]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  24:     0x7f6c16f7bf53 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h6a88cd656aa4a16f
                               at /rustc/da7ffa2d1df2daf747b8e4bdf5659c942abb22af/library/alloc/src/boxed.rs:1940:9
  25:     0x7f6c16f7bf53 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h4501efe38c2b4412
                               at /rustc/da7ffa2d1df2daf747b8e4bdf5659c942abb22af/library/alloc/src/boxed.rs:1940:9
  26:     0x7f6c16f7bf53 - std::sys::unix::thread::Thread::new::thread_start::h67e5c6aa03c98308
                               at /rustc/da7ffa2d1df2daf747b8e4bdf5659c942abb22af/library/std/src/sys/unix/thread.rs:108:17
  27:     0x7f6c16d1d74d - <unknown>
  28:     0x7f6c16d9f700 - <unknown>
  29:                0x0 - <unknown>

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.65.0-beta.3 (da7ffa2d1 2022-10-10) running on x86_64-unknown-linux-gnu

query stack during panic:
end of query stack
thread panicked while panicking. aborting.
zsh: IOT instruction (core dumped)  RUST_BACKTRACE=1 rustc src/main.rs

@NoNaim95 NoNaim95 added 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. labels Oct 12, 2022
@TaKO8Ki
Copy link
Member

TaKO8Ki commented Oct 12, 2022

It seems that the ICE does not occur on latest nightly.

playground

@NoNaim95
Copy link
Author

Yes indeed.
I was told to still submit bugs even when they only occur on newest Beta.

@Rageking8
Copy link
Contributor

@rustbot label +E-needs-test

@rustbot rustbot added the E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. label Oct 12, 2022
@Rageking8
Copy link
Contributor

@rustbot claim

To add the test

@matthiaskrgr
Copy link
Member

If someone finds out which nightly pr fixed it I guess we could consider a backport to beta?

@compiler-errors
Copy link
Member

I fixed this in #102059. I'll beta nominate it.

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. E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been 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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants