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

thread 'rustc' panicked at 'assertion failed: !value.has_escaping_bound_vars()' #92271

Closed
Tamschi opened this issue Dec 25, 2021 · 6 comments
Closed
Labels
C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example 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

@Tamschi
Copy link

Tamschi commented Dec 25, 2021

I don't know how actionable this is, but it's probably better if I report this than not.

I get the error only when compiling in debug mode, both on stable and nightly.
With --release, it just works without any warning.

Code

?

Sorry, I really don't know how to narrow this down.

For what it's worth, this is a server-side web frontend project with a macro DSL that's translated into rather long statements. I think the longest one is around 60k codepoints after using cargo +nightly expand, though that's with very generous whitespace use. It contains a number of nested closures with explicit but partially inferred return type.

I'm not entirely certain, but I think it started happening when I fixed an expression ordering problem. Solving it combined multiple statements into one.

Meta

rustc --version --verbose:

rustc 1.57.0 (f1edd0429 2021-11-29)
binary: rustc
commit-hash: f1edd0429582dd29cccacaf50fd134b05593bd9c
commit-date: 2021-11-29
host: x86_64-pc-windows-msvc
release: 1.57.0
LLVM version: 13.0.0

rustc +nightly --version --verbose:

rustc 1.59.0-nightly (475b00aa4 2021-12-24)
binary: rustc
commit-hash: 475b00aa4037461b506539a06d15ca6091b461a7
commit-date: 2021-12-24
host: x86_64-pc-windows-msvc
release: 1.59.0-nightly
LLVM version: 13.0.0

Error output

stable:

thread 'rustc' panicked at 'assertion failed: !value.has_escaping_bound_vars()', /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c\compiler\rustc_middle\src\ty\sty.rs:974: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.57.0 (f1edd0429 2021-11-29) running on x86_64-pc-windows-msvc

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental --crate-type bin

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

query stack during panic:
#0 [is_sized_raw] computing whether `[lignin::Node<'_, lignin::ThreadSafe>]` is `Sized`
#1 [layout_of] computing layout of `&[lignin::Node<'_, lignin::ThreadSafe>]`
end of query stack
error: could not compile `schichler-dev`

nightly:

thread 'rustc' panicked at 'assertion failed: !value.has_escaping_bound_vars()', /rustc/475b00aa4037461b506539a06d15ca6091b461a7\compiler\rustc_middle\src\ty\sty.rs:1036: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.59.0-nightly (475b00aa4 2021-12-24) running on x86_64-pc-windows-msvc

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental --crate-type bin

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

query stack during panic:
#0 [is_sized_raw] computing whether `[lignin::Node<'_, lignin::ThreadSafe>]` is `Sized`
#1 [layout_of] computing layout of `&[lignin::Node<'_, lignin::ThreadSafe>]`
end of query stack
error: could not compile `schichler-dev`
Backtrace

The normal backtrace didn't really add anything, so I went with the full one:

❯ RUST_BACKTRACE=full cargo build
   Compiling schichler-dev v0.0.0 (C:\Users\Tamme\Documents\Projekte\site)
thread 'rustc' panicked at 'assertion failed: !value.has_escaping_bound_vars()', /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c\compiler\rustc_middle\src\ty\sty.rs:974:9
stack backtrace:
   0:     0x7ffafacf92cf - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h53606b08c01ef688
   1:     0x7ffafad2306a - core::fmt::write::he97f21b785b90134
   2:     0x7ffafaceb448 - <std::io::IoSlice as core::fmt::Debug>::fmt::h967100caef347f28
   3:     0x7ffafacfcd96 - std::panicking::take_hook::hb46205f0055becfd
   4:     0x7ffafacfc797 - std::panicking::take_hook::hb46205f0055becfd
   5:     0x7ffaad37a295 - <tracing_subscriber::fmt::writer::TestWriter as std::io::Write>::flush::hff7a705da113f4ca
   6:     0x7ffafacfd6a9 - std::panicking::rust_panic_with_hook::hce0846b912adb5c5
   7:     0x7ffafacfd11f - rust_begin_unwind
   8:     0x7ffafacf9bf7 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h53606b08c01ef688
   9:     0x7ffafacfd0a9 - rust_begin_unwind
  10:     0x7ffafad59510 - core::panicking::panic_fmt::h58715deff5969a45
  11:     0x7ffafad5945c - core::panicking::panic::hc36befec1b90302c
  12:     0x7ffab15f4f71 - rustc_trait_selection::traits::type_known_to_meet_bound_modulo_regions::h47860435b9d234e9
  13:     0x7ffaaff2b442 - <rustc_typeck::structured_errors::wrong_number_of_generic_args::GenericArgsInfo as core::fmt::Debug>::fmt::h28f032e074f962ff
  14:     0x7ffaaff31815 - <rustc_typeck::structured_errors::wrong_number_of_generic_args::GenericArgsInfo as core::fmt::Debug>::fmt::h28f032e074f962ff
  15:     0x7ffab0afeb4f - ZN16rustc_query_impl13on_disk_cache260_$LT$impl$u20$rustc_serialize..serialize..Decodable$LT$rustc_query_impl..on_disk_cache..CacheDecoder$GT$$u20$for$u20$$RF$std..collections..hash..set..HashSet$LT$rustc_span..def_id..LocalDefId$C$core..hash..BuildHasher
  16:     0x7ffab0bc96e0 - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::try_mark_green::h79c2867594abd9a1
  17:     0x7ffab0ab95d8 - <rustc_span::def_id::LocalDefId as rustc_query_impl::profiling_support::SpecIntoSelfProfilingString>::spec_to_self_profile_string::h641e5a6d4a18de66
  18:     0x7ffab092fa13 - <rustc_mir_dataflow::framework::cursor::CursorPosition as core::fmt::Debug>::fmt::hdad43e681eb5eae7
  19:     0x7ffab0b45e0c - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::try_mark_green::h79c2867594abd9a1
  20:     0x7ffab18c794b - rustc_middle::ty::util::<impl rustc_middle::ty::TyS>::is_sized::h734222fdd07fa0e6
  21:     0x7ffab18b5cc7 - <rustc_middle::ty::layout::LayoutError as core::fmt::Display>::fmt::h3dca6f5dbc110505
  22:     0x7ffab18b15d7 - <rustc_middle::ty::layout::LayoutError as core::fmt::Display>::fmt::h3dca6f5dbc110505
  23:     0x7ffab0b01daf - ZN16rustc_query_impl13on_disk_cache260_$LT$impl$u20$rustc_serialize..serialize..Decodable$LT$rustc_query_impl..on_disk_cache..CacheDecoder$GT$$u20$for$u20$$RF$std..collections..hash..set..HashSet$LT$rustc_span..def_id..LocalDefId$C$core..hash..BuildHasher
  24:     0x7ffab0b98d5d - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::try_mark_green::h79c2867594abd9a1
  25:     0x7ffab0ac6239 - <rustc_span::def_id::LocalDefId as rustc_query_impl::profiling_support::SpecIntoSelfProfilingString>::spec_to_self_profile_string::h641e5a6d4a18de66
  26:     0x7ffab0867284 - <rustc_mir_dataflow::framework::cursor::CursorPosition as core::fmt::Debug>::fmt::hdad43e681eb5eae7
  27:     0x7ffab0a1c78d - <rustc_mir_dataflow::framework::cursor::CursorPosition as core::fmt::Debug>::fmt::hdad43e681eb5eae7
  28:     0x7ffab0b465ae - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::try_mark_green::h79c2867594abd9a1
  29:     0x7ffab17aa4cd - rustc_middle::ty::fast_reject::simplify_type::h2bb92ba1ff793053
  30:     0x7ffab18f6efb - <rustc_middle::ty::FoundRelationships as core::fmt::Debug>::fmt::h2a1bf1256b370cbd
  31:     0x7ffab179502d - ZN12rustc_middle2ty8impls_ty178_$LT$impl$u20$rustc_data_structures..stable_hasher..HashStable$LT$rustc_query_system..ich..hcx..StableHashingContext$GT$$u20$for$u20$$RF$rustc_middle..ty..list..List$LT$T$GT$$GT$11hash_stable5CACHE7__getit17h5313de7d1da7b155
  32:     0x7ffab18f94da - <rustc_middle::ty::FoundRelationships as core::fmt::Debug>::fmt::h2a1bf1256b370cbd
  33:     0x7ffab18b54c6 - <rustc_middle::ty::layout::LayoutError as core::fmt::Display>::fmt::h3dca6f5dbc110505
  34:     0x7ffab18b15d7 - <rustc_middle::ty::layout::LayoutError as core::fmt::Display>::fmt::h3dca6f5dbc110505
  35:     0x7ffab0b01daf - ZN16rustc_query_impl13on_disk_cache260_$LT$impl$u20$rustc_serialize..serialize..Decodable$LT$rustc_query_impl..on_disk_cache..CacheDecoder$GT$$u20$for$u20$$RF$std..collections..hash..set..HashSet$LT$rustc_span..def_id..LocalDefId$C$core..hash..BuildHasher
  36:     0x7ffab0b98d5d - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::try_mark_green::h79c2867594abd9a1
  37:     0x7ffab0ac6239 - <rustc_span::def_id::LocalDefId as rustc_query_impl::profiling_support::SpecIntoSelfProfilingString>::spec_to_self_profile_string::h641e5a6d4a18de66
  38:     0x7ffab0867284 - <rustc_mir_dataflow::framework::cursor::CursorPosition as core::fmt::Debug>::fmt::hdad43e681eb5eae7
  39:     0x7ffab0a1c78d - <rustc_mir_dataflow::framework::cursor::CursorPosition as core::fmt::Debug>::fmt::hdad43e681eb5eae7
  40:     0x7ffab0b465ae - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::try_mark_green::h79c2867594abd9a1
  41:     0x7ffab0cff851 - rustc_codegen_ssa::debuginfo::type_names::compute_debuginfo_type_name::h165abf0f67ca0022
  42:     0x7ffab0cfeffb - rustc_codegen_ssa::debuginfo::type_names::compute_debuginfo_type_name::h165abf0f67ca0022
  43:     0x7ffab0d02302 - rustc_codegen_ssa::debuginfo::type_names::push_item_name::h1927b2ee474397c2
  44:     0x7ffab0cfd4fc - rustc_codegen_ssa::debuginfo::type_names::compute_debuginfo_type_name::h165abf0f67ca0022
  45:     0x7ffaad58eca2 - rustc_interface::proc_macro_decls::provide::h1266abd6c19fdc85
  46:     0x7ffaad5f4869 - <rustc_codegen_llvm::builder::Builder as core::ops::drop::Drop>::drop::h0625e376242d3a62
  47:     0x7ffaad665def - <rustc_codegen_llvm::debuginfo::CrateDebugContext as core::ops::drop::Drop>::drop::he65fcbab0a9b6e61
  48:     0x7ffaad6386c0 - rustc_codegen_llvm::debuginfo::<impl rustc_codegen_ssa::traits::debuginfo::DebugInfoMethods for rustc_codegen_llvm::context::CodegenCx>::dbg_scope_fn::hfb99ae30a17df7c2
  49:     0x7ffaad6381f1 - rustc_codegen_llvm::debuginfo::<impl rustc_codegen_ssa::traits::debuginfo::DebugInfoMethods for rustc_codegen_llvm::context::CodegenCx>::create_function_debug_context::h228e3d70bd6f8cb3
  50:     0x7ffaad69fc5f - <rustc_target::abi::TyAndLayout<&rustc_middle::ty::TyS> as rustc_codegen_llvm::type_of::LayoutLlvmExt>::pointee_info_at::h87f415313a2c8a1c
  51:     0x7ffaad608e22 - <rustc_codegen_llvm::builder::Builder as core::ops::drop::Drop>::drop::h0625e376242d3a62
  52:     0x7ffaad664aab - <rustc_codegen_llvm::base::ValueIter as core::iter::traits::iterator::Iterator>::next::hbe8ba3b53c08e4aa
  53:     0x7ffaad5c1abe - <rustc_codegen_llvm::llvm_::archive_ro::Child as core::ops::drop::Drop>::drop::h64e7a9a154e1ad8b
  54:     0x7ffaad5efe17 - <rustc_codegen_llvm::builder::Builder as core::ops::drop::Drop>::drop::h0625e376242d3a62
  55:     0x7ffaad664295 - <rustc_codegen_llvm::base::ValueIter as core::iter::traits::iterator::Iterator>::next::hbe8ba3b53c08e4aa
  56:     0x7ffaad60726e - <rustc_codegen_llvm::builder::Builder as core::ops::drop::Drop>::drop::h0625e376242d3a62
  57:     0x7ffaad65283b - <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::CodegenBackend>::codegen_crate::h72e78b6cb4763a67
  58:     0x7ffaad4e25d3 - rustc_interface::queries::Linker::link::h24820195fd91a4b8
  59:     0x7ffaad4b9eef - rustc_interface::queries::Queries::ongoing_codegen::hefce8689e8cfdb12
  60:     0x7ffaad3ce71f - <tracing_subscriber::util::TryInitError as core::fmt::Display>::fmt::h8e44660347c50da5
  61:     0x7ffaad398944 - rustc_driver::pretty::print_after_hir_lowering::h16ae7f3f7d316762
  62:     0x7ffaad3d07e6 - <tracing_subscriber::util::TryInitError as core::fmt::Display>::fmt::h8e44660347c50da5
  63:     0x7ffaad39ed63 - rustc_driver::pretty::print_after_hir_lowering::h16ae7f3f7d316762
  64:     0x7ffaad3f9a58 - <rustc_driver::args::Error as core::fmt::Debug>::fmt::h11014d06e9af86ea
  65:     0x7ffafad09d8c - std::sys::windows::thread::Thread::new::h4046847bccf80b57
  66:     0x7ffb80417034 - BaseThreadInitThunk
  67:     0x7ffb80a02651 - RtlUserThreadStart

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.57.0 (f1edd0429 2021-11-29) running on x86_64-pc-windows-msvc

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental --crate-type bin

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

query stack during panic:
#0 [is_sized_raw] computing whether `[lignin::Node<'_, lignin::ThreadSafe>]` is `Sized`
#1 [layout_of] computing layout of `&[lignin::Node<'_, lignin::ThreadSafe>]`
#2 [layout_of] computing layout of `lignin::Node<'_, lignin::ThreadSafe>`
end of query stack
error: could not compile `schichler-dev`

site on  develop is 📦 v0.0.0 via 🦀 v1.57.0
❯ RUST_BACKTRACE=full cargo +nightly run
   Compiling schichler-dev v0.0.0 (C:\Users\Tamme\Documents\Projekte\site)
thread 'rustc' panicked at 'assertion failed: !value.has_escaping_bound_vars()', /rustc/475b00aa4037461b506539a06d15ca6091b461a7\compiler\rustc_middle\src\ty\sty.rs:1036:9
stack backtrace:
   0:     0x7ffafacc677f - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h70dfebee03be165e
   1:     0x7ffafacf444a - core::fmt::write::h5677edca76cc08e3
   2:     0x7ffafacb80f8 - <std::io::IoSliceMut as core::fmt::Debug>::fmt::h34be6fa37a0e28ab
   3:     0x7ffafacc9f26 - std::panicking::take_hook::h98bf6225abdf634c
   4:     0x7ffafacc9a09 - std::panicking::take_hook::h98bf6225abdf634c
   5:     0x7ffaad261cd9 - <rustc_codegen_ssa[64b36f184ba232cf]::back::linker::PtxLinker as rustc_codegen_ssa[64b36f184ba232cf]::back::linker::Linker>::group_end
   6:     0x7ffafacca789 - std::panicking::rust_panic_with_hook::h6d675eb2351e2e00
   7:     0x7ffafacca4df - <std::panicking::begin_panic_handler::StrPanicPayload as core::panic::BoxMeUp>::get::h75b22f5e7c2d7bfe
   8:     0x7ffafacc70a7 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h70dfebee03be165e
   9:     0x7ffafacca239 - rust_begin_unwind
  10:     0x7ffafad26cb0 - core::panicking::panic_fmt::hc013fecba348d4e5
  11:     0x7ffafad26bfc - core::panicking::panic::hebddd40464bc2723
  12:     0x7ffab1513e90 - rustc_trait_selection[157de43d93283836]::traits::type_known_to_meet_bound_modulo_regions
  13:     0x7ffaafe3bb52 - rustc_ty_utils[9e844417a57a001]::provide
  14:     0x7ffaafe48d25 - rustc_ty_utils[9e844417a57a001]::provide
  15:     0x7ffab097ce7f - <rustc_query_impl[a3fd863bae0a72db]::Queries as rustc_middle[e96e0bff5400db54]::ty::query::QueryEngine>::try_mark_green
  16:     0x7ffab0a83b73 - <&[rustc_ast[dcffa5829568529a]::ast::InlineAsmTemplatePiece] as rustc_serialize[b6d7c42e808a4221]::serialize::Decodable<rustc_query_impl[a3fd863bae0a72db]::on_disk_cache::CacheDecoder>>::decode
  17:     0x7ffab0955293 - <rustc_query_impl[a3fd863bae0a72db]::Queries>::as_dyn
  18:     0x7ffab078fd85 - <rustc_mir_dataflow[ff47e7986bd0bd86]::impls::storage_liveness::MaybeRequiresStorage as rustc_mir_dataflow[ff47e7986bd0bd86]::framework::AnalysisDomain>::initialize_start_block
  19:     0x7ffab08a39e6 - <rustc_mir_dataflow[ff47e7986bd0bd86]::impls::storage_liveness::MaybeRequiresStorage as rustc_mir_dataflow[ff47e7986bd0bd86]::framework::AnalysisDomain>::initialize_start_block
  20:     0x7ffab16fa0c5 - <rustc_middle[e96e0bff5400db54]::ty::TyS>::is_sized
  21:     0x7ffab17fcae2 - <rustc_middle[e96e0bff5400db54]::ty::layout::LayoutError as core[4280941b4b41ab6c]::fmt::Display>::fmt
  22:     0x7ffab1810098 - <rustc_middle[e96e0bff5400db54]::ty::layout::LayoutError as core[4280941b4b41ab6c]::fmt::Debug>::fmt
  23:     0x7ffab097ccef - <rustc_query_impl[a3fd863bae0a72db]::Queries as rustc_middle[e96e0bff5400db54]::ty::query::QueryEngine>::try_mark_green
  24:     0x7ffab0a82c87 - <&[rustc_ast[dcffa5829568529a]::ast::InlineAsmTemplatePiece] as rustc_serialize[b6d7c42e808a4221]::serialize::Decodable<rustc_query_impl[a3fd863bae0a72db]::on_disk_cache::CacheDecoder>>::decode
  25:     0x7ffab094396f - <rustc_query_impl[a3fd863bae0a72db]::Queries>::as_dyn
  26:     0x7ffab08e8277 - <rustc_mir_dataflow[ff47e7986bd0bd86]::impls::storage_liveness::MaybeRequiresStorage as rustc_mir_dataflow[ff47e7986bd0bd86]::framework::AnalysisDomain>::initialize_start_block
  27:     0x7ffab0973a9a - <rustc_query_impl[a3fd863bae0a72db]::Queries as rustc_middle[e96e0bff5400db54]::ty::query::QueryEngine>::try_mark_green
  28:     0x7ffab18ad431 - <rustc_middle[e96e0bff5400db54]::mir::visit::PlaceContext>::is_place_assignment
  29:     0x7ffab1869ea8 - <rustc_middle[e96e0bff5400db54]::ty::util::OpaqueTypeExpander as rustc_middle[e96e0bff5400db54]::ty::fold::TypeFolder>::fold_ty
  30:     0x7ffab18a8600 - <rustc_middle[e96e0bff5400db54]::mir::visit::PlaceContext>::is_place_assignment
  31:     0x7ffab18694a6 - <rustc_middle[e96e0bff5400db54]::ty::util::OpaqueTypeExpander as rustc_middle[e96e0bff5400db54]::ty::fold::TypeFolder>::fold_ty
  32:     0x7ffab17fcdd6 - <rustc_middle[e96e0bff5400db54]::ty::layout::LayoutError as core[4280941b4b41ab6c]::fmt::Display>::fmt
  33:     0x7ffab1810098 - <rustc_middle[e96e0bff5400db54]::ty::layout::LayoutError as core[4280941b4b41ab6c]::fmt::Debug>::fmt
  34:     0x7ffab097ccef - <rustc_query_impl[a3fd863bae0a72db]::Queries as rustc_middle[e96e0bff5400db54]::ty::query::QueryEngine>::try_mark_green
  35:     0x7ffab0a82c87 - <&[rustc_ast[dcffa5829568529a]::ast::InlineAsmTemplatePiece] as rustc_serialize[b6d7c42e808a4221]::serialize::Decodable<rustc_query_impl[a3fd863bae0a72db]::on_disk_cache::CacheDecoder>>::decode
  36:     0x7ffab094396f - <rustc_query_impl[a3fd863bae0a72db]::Queries>::as_dyn
  37:     0x7ffab08e8277 - <rustc_mir_dataflow[ff47e7986bd0bd86]::impls::storage_liveness::MaybeRequiresStorage as rustc_mir_dataflow[ff47e7986bd0bd86]::framework::AnalysisDomain>::initialize_start_block
  38:     0x7ffab0973a9a - <rustc_query_impl[a3fd863bae0a72db]::Queries as rustc_middle[e96e0bff5400db54]::ty::query::QueryEngine>::try_mark_green
  39:     0x7ffab0bf2cad - rustc_codegen_ssa[64b36f184ba232cf]::debuginfo::type_names::compute_debuginfo_type_name
  40:     0x7ffab0bf36bc - rustc_codegen_ssa[64b36f184ba232cf]::debuginfo::type_names::compute_debuginfo_type_name
  41:     0x7ffab0bf5c9e - rustc_codegen_ssa[64b36f184ba232cf]::debuginfo::type_names::push_item_name
  42:     0x7ffab0bf1a6c - rustc_codegen_ssa[64b36f184ba232cf]::debuginfo::type_names::compute_debuginfo_type_name
  43:     0x7ffaad4fa215 - <rustc_ast[dcffa5829568529a]::ast::Item as rustc_ast[dcffa5829568529a]::ast_like::AstLike>::attrs
  44:     0x7ffaad4f7671 - <rustc_ast[dcffa5829568529a]::ast::Item as rustc_ast[dcffa5829568529a]::ast_like::AstLike>::attrs
  45:     0x7ffaad55aec9 - <rustc_codegen_llvm[b8e7927dc9b06d3]::back::lto::ThinLTOKeysMap as core[4280941b4b41ab6c]::fmt::Debug>::fmt
  46:     0x7ffaad588641 - <rustc_codegen_llvm[b8e7927dc9b06d3]::debuginfo::CrateDebugContext as core[4280941b4b41ab6c]::ops::drop::Drop>::drop
  47:     0x7ffaad570569 - <rustc_codegen_llvm[b8e7927dc9b06d3]::context::CodegenCx as rustc_codegen_ssa[64b36f184ba232cf]::traits::debuginfo::DebugInfoMethods>::dbg_scope_fn
  48:     0x7ffaad5700ff - <rustc_codegen_llvm[b8e7927dc9b06d3]::context::CodegenCx as rustc_codegen_ssa[64b36f184ba232cf]::traits::debuginfo::DebugInfoMethods>::create_function_debug_context
  49:     0x7ffaad5ee95c - <rustc_codegen_llvm[b8e7927dc9b06d3]::back::archive::LlvmArchiveBuilder as rustc_codegen_ssa[64b36f184ba232cf]::back::archive::ArchiveBuilder>::inject_dll_import_lib
  50:     0x7ffaad581cc2 - <rustc_codegen_llvm[b8e7927dc9b06d3]::context::CodegenCx as rustc_codegen_ssa[64b36f184ba232cf]::traits::type_::LayoutTypeMethods>::reg_backend_type
  51:     0x7ffaad5a76ec - <rustc_codegen_llvm[b8e7927dc9b06d3]::builder::Builder as rustc_codegen_ssa[64b36f184ba232cf]::traits::debuginfo::DebugInfoBuilderMethods>::set_var_name
  52:     0x7ffaad52c66f - <rustc_codegen_llvm[b8e7927dc9b06d3]::base::ValueIter as core[4280941b4b41ab6c]::iter::traits::iterator::Iterator>::next
  53:     0x7ffaad505b0e - <rustc_codegen_llvm[b8e7927dc9b06d3]::debuginfo::metadata::MemberDescription as core[4280941b4b41ab6c]::fmt::Debug>::fmt
  54:     0x7ffaad52a971 - <rustc_codegen_llvm[b8e7927dc9b06d3]::base::ValueIter as core[4280941b4b41ab6c]::iter::traits::iterator::Iterator>::next
  55:     0x7ffaad58f020 - <rustc_codegen_llvm[b8e7927dc9b06d3]::LlvmCodegenBackend as rustc_codegen_ssa[64b36f184ba232cf]::traits::backend::CodegenBackend>::codegen_crate
  56:     0x7ffaad48b5d2 - <rustc_interface[7fa1b5bbfbc9979f]::passes::boxed_resolver::BoxedResolver>::to_resolver_outputs
  57:     0x7ffaad3e2c2b - <rustc_interface[7fa1b5bbfbc9979f]::queries::Queries>::ongoing_codegen
  58:     0x7ffaad2e1b11 - <rustc_middle[e96e0bff5400db54]::ty::SymbolName as core[4280941b4b41ab6c]::fmt::Debug>::fmt
  59:     0x7ffaad27e7e5 - rustc_driver[12f064871d307902]::pretty::print_after_hir_lowering
  60:     0x7ffaad2dfe73 - <rustc_middle[e96e0bff5400db54]::ty::SymbolName as core[4280941b4b41ab6c]::fmt::Debug>::fmt
  61:     0x7ffaad28b7d3 - <tracing_subscriber[e579fb2cd457e50f]::util::TryInitError as core[4280941b4b41ab6c]::fmt::Display>::fmt
  62:     0x7ffaad2fd408 - <rustc_driver[12f064871d307902]::args::Error as core[4280941b4b41ab6c]::fmt::Debug>::fmt
  63:     0x7ffafacd92dc - std::sys::windows::thread::Thread::new::hf8403c237fd98d38
  64:     0x7ffb80417034 - BaseThreadInitThunk
  65:     0x7ffb80a02651 - RtlUserThreadStart

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.59.0-nightly (475b00aa4 2021-12-24) running on x86_64-pc-windows-msvc

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental --crate-type bin

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

query stack during panic:
#0 [is_sized_raw] computing whether `[lignin::Node<'_, lignin::ThreadSafe>]` is `Sized`
#1 [layout_of] computing layout of `&[lignin::Node<'_, lignin::ThreadSafe>]`
#2 [layout_of] computing layout of `lignin::Node<'_, lignin::ThreadSafe>`
end of query stack
error: could not compile `schichler-dev`

@Tamschi Tamschi 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 Dec 25, 2021
@BGR360
Copy link
Contributor

BGR360 commented Dec 26, 2021

Providing the entire piece of code (even as a link to a GitHub repo or as a zip file) would be better than not providing any, especially if you can reliably reproduce the error with it.

If you'd like to try narrowing it down to the relevant part of the code, look at the query stack:

query stack during panic:
#0 [is_sized_raw] computing whether `[lignin::Node<'_, lignin::ThreadSafe>]` is `Sized`
#1 [layout_of] computing layout of `&[lignin::Node<'_, lignin::ThreadSafe>]`
#2 [layout_of] computing layout of `lignin::Node<'_, lignin::ThreadSafe>`
end of query stack
error: could not compile `schichler-dev`

So at minimum, it would be good to see the definition of lignin::Node

@rustbot label +E-needs-mcve

@rustbot rustbot added the E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example label Dec 26, 2021
@Tamschi
Copy link
Author

Tamschi commented Dec 26, 2021

I'll see if I can make a small project in the next few days, since the one this is happening on isn't ready for publishing.

For now, Node is this fairly plain enum here: https://docs.rs/lignin/0.1.0/lignin/enum.Node.html
The only thing special about it is that the types set as generic parameters for DomRef are vacant while I'm not compiling lignin with the "callbacks" feature, which I'm not doing for this project here.

@Patrick-Poitras
Copy link
Contributor

Same bug as #92537?

@Tamschi
Copy link
Author

Tamschi commented Jan 7, 2022

Same bug as #92537?

Most likely! My code has the same kind of &[Self] field because I'm generating a VDOM as well. I don't use pointers directly, but I'm allocating arrays in a bumpalo::Bump and doing a lot of type inference there.

Thanks for mentioning it, I'll subscribe to the other issue and close this one if that resolves it.

@Alexendoo
Copy link
Member

@Tamschi does this still ICE for you on the latest nightly?

@Tamschi
Copy link
Author

Tamschi commented Mar 31, 2022

@Tamschi does this still ICE for you on the latest nightly?

It appears to be fixed (even on stable)! I'll close this issue.

@Tamschi Tamschi closed this as completed Mar 31, 2022
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-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example 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

No branches or pull requests

5 participants