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: ast lowering: no entry for node id: NodeId(53) #110899

Closed
matthiaskrgr opened this issue Apr 27, 2023 · 4 comments · Fixed by #110982
Closed

ICE: ast lowering: no entry for node id: NodeId(53) #110899

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

Comments

@matthiaskrgr
Copy link
Member

Code

impl Struct {
    fn wrap_ref_Self_Self(
        self: Wrap<
    {
        fn ref_self(&self, f: &u32) -> &u32 {
            f
        }
    },
    Self,
>,
        f: &u8,
    ) -> &u8 {
        f
    }
}

Meta

rustc --version --verbose:

rustc 1.71.0-nightly (1c42cb4ef 2023-04-26)
binary: rustc
commit-hash: 1c42cb4ef0544fbfaa500216e53382d6b079c001
commit-date: 2023-04-26
host: x86_64-unknown-linux-gnu
release: 1.71.0-nightly
LLVM version: 16.0.2

Error output

error: `self` parameter is only allowed in associated functions
 --> treereduce.out:5:21
  |
5 |         fn ref_self(&self, f: &u32) -> &u32 {
  |                     ^^^^^ not semantically valid as function parameter
  |
  = note: associated functions are those in `impl` or `trait` definitions

error[E0401]: can't use generic parameters from outer function
 --> treereduce.out:5:21
  |
1 | impl Struct {
  | ---- `Self` type implicitly declared here, by this `impl`
...
5 |         fn ref_self(&self, f: &u32) -> &u32 {
  |                     ^^^^^
  |                     |
  |                     use of generic parameter from outer function
  |                     use a type here instead

error[E0412]: cannot find type `Struct` in this scope
 --> treereduce.out:1:6
  |
1 | impl Struct {
  |      ^^^^^^ not found in this scope

error[E0412]: cannot find type `Wrap` in this scope
 --> treereduce.out:3:15
  |
3 |         self: Wrap<
  |               ^^^^ not found in this scope
Backtrace


thread 'rustc' panicked at 'no entry for node id: `NodeId(53)`', compiler/rustc_ast_lowering/src/lib.rs:548:55
stack backtrace:
   0:     0x7fb8a7368e73 - std::backtrace_rs::backtrace::libunwind::trace::h0c8179e89cc9893e
                               at /rustc/1c42cb4ef0544fbfaa500216e53382d6b079c001/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7fb8a7368e73 - std::backtrace_rs::backtrace::trace_unsynchronized::hfadffaff9fceb6ba
                               at /rustc/1c42cb4ef0544fbfaa500216e53382d6b079c001/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7fb8a7368e73 - std::sys_common::backtrace::_print_fmt::ha49f609af156c4cb
                               at /rustc/1c42cb4ef0544fbfaa500216e53382d6b079c001/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7fb8a7368e73 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h0ad104dc9ebb0bab
                               at /rustc/1c42cb4ef0544fbfaa500216e53382d6b079c001/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7fb8a73c9c8f - core::fmt::write::h076b507083203424
                               at /rustc/1c42cb4ef0544fbfaa500216e53382d6b079c001/library/core/src/fmt/mod.rs:1247:17
   5:     0x7fb8a735bea1 - std::io::Write::write_fmt::ha4c326e8c8c981e1
                               at /rustc/1c42cb4ef0544fbfaa500216e53382d6b079c001/library/std/src/io/mod.rs:1712:15
   6:     0x7fb8a7368c85 - std::sys_common::backtrace::_print::hbc9e8503f2c8583b
                               at /rustc/1c42cb4ef0544fbfaa500216e53382d6b079c001/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x7fb8a7368c85 - std::sys_common::backtrace::print::he24fec1d9c5516a7
                               at /rustc/1c42cb4ef0544fbfaa500216e53382d6b079c001/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x7fb8a736b847 - std::panicking::default_hook::{{closure}}::hf29caaf6379226a6
   9:     0x7fb8a736b635 - std::panicking::default_hook::h0765c9476c979227
                               at /rustc/1c42cb4ef0544fbfaa500216e53382d6b079c001/library/std/src/panicking.rs:288:9
  10:     0x7fb8aa5bf8c5 - <rustc_driver_impl[b4ece89b41fa04d8]::DEFAULT_HOOK::{closure#0}::{closure#0} as core[a53159a38bb5d97c]::ops::function::FnOnce<(&core[a53159a38bb5d97c]::panic::panic_info::PanicInfo,)>>::call_once::{shim:vtable#0}
  11:     0x7fb8a736bf85 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h7a83df3f1b1b39ec
                               at /rustc/1c42cb4ef0544fbfaa500216e53382d6b079c001/library/alloc/src/boxed.rs:1976:9
  12:     0x7fb8a736bf85 - std::panicking::rust_panic_with_hook::h060701a46b500fdf
                               at /rustc/1c42cb4ef0544fbfaa500216e53382d6b079c001/library/std/src/panicking.rs:695:13
  13:     0x7fb8a736bcf9 - std::panicking::begin_panic_handler::{{closure}}::hcfb53c4ced379f9a
                               at /rustc/1c42cb4ef0544fbfaa500216e53382d6b079c001/library/std/src/panicking.rs:582:13
  14:     0x7fb8a73692b6 - std::sys_common::backtrace::__rust_end_short_backtrace::h2100286b873f9af0
                               at /rustc/1c42cb4ef0544fbfaa500216e53382d6b079c001/library/std/src/sys_common/backtrace.rs:150:18
  15:     0x7fb8a736ba52 - rust_begin_unwind
                               at /rustc/1c42cb4ef0544fbfaa500216e53382d6b079c001/library/std/src/panicking.rs:578:5
  16:     0x7fb8a73c5f23 - core::panicking::panic_fmt::hcbb1fb2c2e65f651
                               at /rustc/1c42cb4ef0544fbfaa500216e53382d6b079c001/library/core/src/panicking.rs:67:14
  17:     0x7fb8a928b109 - <rustc_ast_lowering[eda967f0a47da82c]::LoweringContext>::new_named_lifetime_with_res
  18:     0x7fb8a92852dc - <rustc_ast_lowering[eda967f0a47da82c]::LoweringContext>::lower_ty_direct
  19:     0x7fb8a9283548 - <rustc_ast_lowering[eda967f0a47da82c]::LoweringContext>::lower_fn_decl
  20:     0x7fb8a927fe8d - <rustc_ast_lowering[eda967f0a47da82c]::LoweringContext>::lower_method_sig
  21:     0x7fb8a9248fcd - <rustc_ast_lowering[eda967f0a47da82c]::LoweringContext>::with_hir_id_owner::<<rustc_ast_lowering[eda967f0a47da82c]::item::ItemLowerer>::with_lctx<<rustc_ast_lowering[eda967f0a47da82c]::item::ItemLowerer>::lower_assoc_item::{closure#0}>::{closure#0}>
  22:     0x7fb8a92457b2 - <rustc_ast_lowering[eda967f0a47da82c]::item::ItemLowerer>::lower_node
  23:     0x7fb8a9244791 - rustc_ast_lowering[eda967f0a47da82c]::lower_to_hir
  24:     0x7fb8a9d8adb1 - rustc_query_system[38efe1ae13b76606]::query::plumbing::try_execute_query::<rustc_query_impl[d894186be28c7657]::queries::hir_crate, rustc_query_impl[d894186be28c7657]::plumbing::QueryCtxt>
  25:     0x7fb8a9d8aa9d - <rustc_query_impl[d894186be28c7657]::Queries as rustc_middle[74d31bc1c7288efd]::ty::query::QueryEngine>::hir_crate
  26:     0x7fb8a8659491 - rustc_query_system[38efe1ae13b76606]::query::plumbing::try_execute_query::<rustc_query_impl[d894186be28c7657]::queries::hir_attrs, rustc_query_impl[d894186be28c7657]::plumbing::QueryCtxt>
  27:     0x7fb8a8657f26 - <rustc_middle[74d31bc1c7288efd]::hir::map::Map>::attrs
  28:     0x7fb8a9dfdf33 - rustc_passes[58fb231d5542acc4]::entry::entry_fn
  29:     0x7fb8a9de9709 - rustc_query_system[38efe1ae13b76606]::query::plumbing::try_execute_query::<rustc_query_impl[d894186be28c7657]::queries::entry_fn, rustc_query_impl[d894186be28c7657]::plumbing::QueryCtxt>
  30:     0x7fb8a9de93dd - <rustc_query_impl[d894186be28c7657]::Queries as rustc_middle[74d31bc1c7288efd]::ty::query::QueryEngine>::entry_fn
  31:     0x7fb8a9cb6548 - <rustc_session[86cf650fda0448f5]::session::Session>::time::<core[a53159a38bb5d97c]::option::Option<(rustc_span[5acbb0d3e38bbf81]::def_id::DefId, rustc_session[86cf650fda0448f5]::config::EntryFnType)>, rustc_interface[69aa8c17999313ff]::passes::analysis::{closure#0}::{closure#0}::{closure#0}>
  32:     0x7fb8a9a93794 - <rustc_session[86cf650fda0448f5]::session::Session>::time::<(), rustc_interface[69aa8c17999313ff]::passes::analysis::{closure#0}>
  33:     0x7fb8a9a92014 - rustc_interface[69aa8c17999313ff]::passes::analysis
  34:     0x7fb8a9d3e3a2 - rustc_query_system[38efe1ae13b76606]::query::plumbing::try_execute_query::<rustc_query_impl[d894186be28c7657]::queries::analysis, rustc_query_impl[d894186be28c7657]::plumbing::QueryCtxt>
  35:     0x7fb8a9d3e0b0 - <rustc_query_impl[d894186be28c7657]::Queries as rustc_middle[74d31bc1c7288efd]::ty::query::QueryEngine>::analysis
  36:     0x7fb8a97ba90a - <rustc_middle[74d31bc1c7288efd]::ty::context::GlobalCtxt>::enter::<rustc_driver_impl[b4ece89b41fa04d8]::run_compiler::{closure#1}::{closure#2}::{closure#4}, core[a53159a38bb5d97c]::result::Result<(), rustc_span[5acbb0d3e38bbf81]::ErrorGuaranteed>>
  37:     0x7fb8a97b9b48 - <rustc_interface[69aa8c17999313ff]::interface::Compiler>::enter::<rustc_driver_impl[b4ece89b41fa04d8]::run_compiler::{closure#1}::{closure#2}, core[a53159a38bb5d97c]::result::Result<core[a53159a38bb5d97c]::option::Option<rustc_interface[69aa8c17999313ff]::queries::Linker>, rustc_span[5acbb0d3e38bbf81]::ErrorGuaranteed>>
  38:     0x7fb8a97b7b6f - rustc_span[5acbb0d3e38bbf81]::set_source_map::<core[a53159a38bb5d97c]::result::Result<(), rustc_span[5acbb0d3e38bbf81]::ErrorGuaranteed>, rustc_interface[69aa8c17999313ff]::interface::run_compiler<core[a53159a38bb5d97c]::result::Result<(), rustc_span[5acbb0d3e38bbf81]::ErrorGuaranteed>, rustc_driver_impl[b4ece89b41fa04d8]::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  39:     0x7fb8a97b7200 - std[b0e36382822581c2]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[69aa8c17999313ff]::util::run_in_thread_pool_with_globals<rustc_interface[69aa8c17999313ff]::interface::run_compiler<core[a53159a38bb5d97c]::result::Result<(), rustc_span[5acbb0d3e38bbf81]::ErrorGuaranteed>, rustc_driver_impl[b4ece89b41fa04d8]::run_compiler::{closure#1}>::{closure#0}, core[a53159a38bb5d97c]::result::Result<(), rustc_span[5acbb0d3e38bbf81]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[a53159a38bb5d97c]::result::Result<(), rustc_span[5acbb0d3e38bbf81]::ErrorGuaranteed>>
  40:     0x7fb8a97b6b21 - <<std[b0e36382822581c2]::thread::Builder>::spawn_unchecked_<rustc_interface[69aa8c17999313ff]::util::run_in_thread_pool_with_globals<rustc_interface[69aa8c17999313ff]::interface::run_compiler<core[a53159a38bb5d97c]::result::Result<(), rustc_span[5acbb0d3e38bbf81]::ErrorGuaranteed>, rustc_driver_impl[b4ece89b41fa04d8]::run_compiler::{closure#1}>::{closure#0}, core[a53159a38bb5d97c]::result::Result<(), rustc_span[5acbb0d3e38bbf81]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[a53159a38bb5d97c]::result::Result<(), rustc_span[5acbb0d3e38bbf81]::ErrorGuaranteed>>::{closure#1} as core[a53159a38bb5d97c]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  41:     0x7fb8a7376365 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h2b4cb02d9a218e1d
                               at /rustc/1c42cb4ef0544fbfaa500216e53382d6b079c001/library/alloc/src/boxed.rs:1962:9
  42:     0x7fb8a7376365 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hbd8144eacfab6e10
                               at /rustc/1c42cb4ef0544fbfaa500216e53382d6b079c001/library/alloc/src/boxed.rs:1962:9
  43:     0x7fb8a7376365 - std::sys::unix::thread::Thread::new::thread_start::h95499a4b2fca6f4a
                               at /rustc/1c42cb4ef0544fbfaa500216e53382d6b079c001/library/std/src/sys/unix/thread.rs:108:17
  44:     0x7fb8a7110bb5 - <unknown>
  45:     0x7fb8a7192d90 - <unknown>
  46:                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.71.0-nightly (1c42cb4ef 2023-04-26) running on x86_64-unknown-linux-gnu

query stack during panic:
thread 'rustc' panicked at 'already borrowed: BorrowMutError', /rustc/1c42cb4ef0544fbfaa500216e53382d6b079c001/compiler/rustc_query_system/src/query/plumbing.rs:330:39
stack backtrace:
   0:     0x7fb8a7368e73 - std::backtrace_rs::backtrace::libunwind::trace::h0c8179e89cc9893e
                               at /rustc/1c42cb4ef0544fbfaa500216e53382d6b079c001/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7fb8a7368e73 - std::backtrace_rs::backtrace::trace_unsynchronized::hfadffaff9fceb6ba
                               at /rustc/1c42cb4ef0544fbfaa500216e53382d6b079c001/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7fb8a7368e73 - std::sys_common::backtrace::_print_fmt::ha49f609af156c4cb
                               at /rustc/1c42cb4ef0544fbfaa500216e53382d6b079c001/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7fb8a7368e73 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h0ad104dc9ebb0bab
                               at /rustc/1c42cb4ef0544fbfaa500216e53382d6b079c001/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7fb8a73c9c8f - core::fmt::write::h076b507083203424
                               at /rustc/1c42cb4ef0544fbfaa500216e53382d6b079c001/library/core/src/fmt/mod.rs:1247:17
   5:     0x7fb8a735bea1 - std::io::Write::write_fmt::ha4c326e8c8c981e1
                               at /rustc/1c42cb4ef0544fbfaa500216e53382d6b079c001/library/std/src/io/mod.rs:1712:15
   6:     0x7fb8a7368c85 - std::sys_common::backtrace::_print::hbc9e8503f2c8583b
                               at /rustc/1c42cb4ef0544fbfaa500216e53382d6b079c001/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x7fb8a7368c85 - std::sys_common::backtrace::print::he24fec1d9c5516a7
                               at /rustc/1c42cb4ef0544fbfaa500216e53382d6b079c001/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x7fb8a736b847 - std::panicking::default_hook::{{closure}}::hf29caaf6379226a6
   9:     0x7fb8a736b635 - std::panicking::default_hook::h0765c9476c979227
                               at /rustc/1c42cb4ef0544fbfaa500216e53382d6b079c001/library/std/src/panicking.rs:288:9
  10:     0x7fb8aa5bf8c5 - <rustc_driver_impl[b4ece89b41fa04d8]::DEFAULT_HOOK::{closure#0}::{closure#0} as core[a53159a38bb5d97c]::ops::function::FnOnce<(&core[a53159a38bb5d97c]::panic::panic_info::PanicInfo,)>>::call_once::{shim:vtable#0}
  11:     0x7fb8a736bf85 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h7a83df3f1b1b39ec
                               at /rustc/1c42cb4ef0544fbfaa500216e53382d6b079c001/library/alloc/src/boxed.rs:1976:9
  12:     0x7fb8a736bf85 - std::panicking::rust_panic_with_hook::h060701a46b500fdf
                               at /rustc/1c42cb4ef0544fbfaa500216e53382d6b079c001/library/std/src/panicking.rs:695:13
  13:     0x7fb8a736bcf9 - std::panicking::begin_panic_handler::{{closure}}::hcfb53c4ced379f9a
                               at /rustc/1c42cb4ef0544fbfaa500216e53382d6b079c001/library/std/src/panicking.rs:582:13
  14:     0x7fb8a73692b6 - std::sys_common::backtrace::__rust_end_short_backtrace::h2100286b873f9af0
                               at /rustc/1c42cb4ef0544fbfaa500216e53382d6b079c001/library/std/src/sys_common/backtrace.rs:150:18
  15:     0x7fb8a736ba52 - rust_begin_unwind
                               at /rustc/1c42cb4ef0544fbfaa500216e53382d6b079c001/library/std/src/panicking.rs:578:5
  16:     0x7fb8a73c5f23 - core::panicking::panic_fmt::hcbb1fb2c2e65f651
                               at /rustc/1c42cb4ef0544fbfaa500216e53382d6b079c001/library/core/src/panicking.rs:67:14
  17:     0x7fb8a73c6553 - core::result::unwrap_failed::ha7348709f208b33c
                               at /rustc/1c42cb4ef0544fbfaa500216e53382d6b079c001/library/core/src/result.rs:1651:5
  18:     0x7fb8a8659666 - rustc_query_system[38efe1ae13b76606]::query::plumbing::try_execute_query::<rustc_query_impl[d894186be28c7657]::queries::hir_attrs, rustc_query_impl[d894186be28c7657]::plumbing::QueryCtxt>
  19:     0x7fb8a8657f26 - <rustc_middle[74d31bc1c7288efd]::hir::map::Map>::attrs
  20:     0x7fb8a9bfb5e4 - <rustc_middle[74d31bc1c7288efd]::middle::limits::provide::{closure#0} as core[a53159a38bb5d97c]::ops::function::FnOnce<(rustc_middle[74d31bc1c7288efd]::ty::context::TyCtxt, ())>>::call_once
  21:     0x7fb8a9da6063 - rustc_query_system[38efe1ae13b76606]::query::plumbing::try_execute_query::<rustc_query_impl[d894186be28c7657]::queries::limits, rustc_query_impl[d894186be28c7657]::plumbing::QueryCtxt>
  22:     0x7fb8a9da5cc9 - <rustc_query_impl[d894186be28c7657]::Queries as rustc_middle[74d31bc1c7288efd]::ty::query::QueryEngine>::limits
  23:     0x7fb8a86f2909 - <rustc_middle[74d31bc1c7288efd]::ty::print::pretty::FmtPrinter>::new
  24:     0x7fb8aab4c143 - <rustc_middle[74d31bc1c7288efd]::ty::context::TyCtxt>::def_path_str_with_substs::<rustc_hir[91d5175e7694dd08]::hir_id::OwnerId>
  25:     0x7fb8aaaec3c2 - rustc_middle[74d31bc1c7288efd]::query::descs::hir_attrs
  26:     0x7fb8aaefb555 - rustc_query_impl[d894186be28c7657]::plumbing::create_query_frame::<rustc_span[5acbb0d3e38bbf81]::def_id::LocalDefId>
  27:     0x7fb8aaec1753 - <rustc_query_impl[d894186be28c7657]::query_structs::hir_attrs::{closure#0}::{closure#0} as core[a53159a38bb5d97c]::ops::function::FnOnce<(rustc_query_impl[d894186be28c7657]::plumbing::QueryCtxt, rustc_hir[91d5175e7694dd08]::hir_id::OwnerId)>>::call_once
  28:     0x7fb8aae1595d - <rustc_query_system[38efe1ae13b76606]::query::plumbing::QueryState<rustc_hir[91d5175e7694dd08]::hir_id::OwnerId, rustc_middle[74d31bc1c7288efd]::dep_graph::dep_node::DepKind>>::try_collect_active_jobs::<rustc_query_impl[d894186be28c7657]::plumbing::QueryCtxt>
  29:     0x7fb8aaf4dd02 - <rustc_query_impl[d894186be28c7657]::Queries>::try_collect_active_jobs
  30:     0x7fb8aae8ab96 - rustc_query_system[38efe1ae13b76606]::query::job::print_query_stack::<rustc_query_impl[d894186be28c7657]::plumbing::QueryCtxt>
  31:     0x7fb8aa9447d5 - rustc_interface[69aa8c17999313ff]::interface::try_print_query_stack
  32:     0x7fb8aa5c1cd8 - rustc_driver_impl[b4ece89b41fa04d8]::report_ice
  33:     0x7fb8aa5bf90c - <rustc_driver_impl[b4ece89b41fa04d8]::DEFAULT_HOOK::{closure#0}::{closure#0} as core[a53159a38bb5d97c]::ops::function::FnOnce<(&core[a53159a38bb5d97c]::panic::panic_info::PanicInfo,)>>::call_once::{shim:vtable#0}
  34:     0x7fb8a736bf85 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h7a83df3f1b1b39ec
                               at /rustc/1c42cb4ef0544fbfaa500216e53382d6b079c001/library/alloc/src/boxed.rs:1976:9
  35:     0x7fb8a736bf85 - std::panicking::rust_panic_with_hook::h060701a46b500fdf
                               at /rustc/1c42cb4ef0544fbfaa500216e53382d6b079c001/library/std/src/panicking.rs:695:13
  36:     0x7fb8a736bcf9 - std::panicking::begin_panic_handler::{{closure}}::hcfb53c4ced379f9a
                               at /rustc/1c42cb4ef0544fbfaa500216e53382d6b079c001/library/std/src/panicking.rs:582:13
  37:     0x7fb8a73692b6 - std::sys_common::backtrace::__rust_end_short_backtrace::h2100286b873f9af0
                               at /rustc/1c42cb4ef0544fbfaa500216e53382d6b079c001/library/std/src/sys_common/backtrace.rs:150:18
  38:     0x7fb8a736ba52 - rust_begin_unwind
                               at /rustc/1c42cb4ef0544fbfaa500216e53382d6b079c001/library/std/src/panicking.rs:578:5
  39:     0x7fb8a73c5f23 - core::panicking::panic_fmt::hcbb1fb2c2e65f651
                               at /rustc/1c42cb4ef0544fbfaa500216e53382d6b079c001/library/core/src/panicking.rs:67:14
  40:     0x7fb8a928b109 - <rustc_ast_lowering[eda967f0a47da82c]::LoweringContext>::new_named_lifetime_with_res
  41:     0x7fb8a92852dc - <rustc_ast_lowering[eda967f0a47da82c]::LoweringContext>::lower_ty_direct
  42:     0x7fb8a9283548 - <rustc_ast_lowering[eda967f0a47da82c]::LoweringContext>::lower_fn_decl
  43:     0x7fb8a927fe8d - <rustc_ast_lowering[eda967f0a47da82c]::LoweringContext>::lower_method_sig
  44:     0x7fb8a9248fcd - <rustc_ast_lowering[eda967f0a47da82c]::LoweringContext>::with_hir_id_owner::<<rustc_ast_lowering[eda967f0a47da82c]::item::ItemLowerer>::with_lctx<<rustc_ast_lowering[eda967f0a47da82c]::item::ItemLowerer>::lower_assoc_item::{closure#0}>::{closure#0}>
  45:     0x7fb8a92457b2 - <rustc_ast_lowering[eda967f0a47da82c]::item::ItemLowerer>::lower_node
  46:     0x7fb8a9244791 - rustc_ast_lowering[eda967f0a47da82c]::lower_to_hir
  47:     0x7fb8a9d8adb1 - rustc_query_system[38efe1ae13b76606]::query::plumbing::try_execute_query::<rustc_query_impl[d894186be28c7657]::queries::hir_crate, rustc_query_impl[d894186be28c7657]::plumbing::QueryCtxt>
  48:     0x7fb8a9d8aa9d - <rustc_query_impl[d894186be28c7657]::Queries as rustc_middle[74d31bc1c7288efd]::ty::query::QueryEngine>::hir_crate
  49:     0x7fb8a8659491 - rustc_query_system[38efe1ae13b76606]::query::plumbing::try_execute_query::<rustc_query_impl[d894186be28c7657]::queries::hir_attrs, rustc_query_impl[d894186be28c7657]::plumbing::QueryCtxt>
  50:     0x7fb8a8657f26 - <rustc_middle[74d31bc1c7288efd]::hir::map::Map>::attrs
  51:     0x7fb8a9dfdf33 - rustc_passes[58fb231d5542acc4]::entry::entry_fn
  52:     0x7fb8a9de9709 - rustc_query_system[38efe1ae13b76606]::query::plumbing::try_execute_query::<rustc_query_impl[d894186be28c7657]::queries::entry_fn, rustc_query_impl[d894186be28c7657]::plumbing::QueryCtxt>
  53:     0x7fb8a9de93dd - <rustc_query_impl[d894186be28c7657]::Queries as rustc_middle[74d31bc1c7288efd]::ty::query::QueryEngine>::entry_fn
  54:     0x7fb8a9cb6548 - <rustc_session[86cf650fda0448f5]::session::Session>::time::<core[a53159a38bb5d97c]::option::Option<(rustc_span[5acbb0d3e38bbf81]::def_id::DefId, rustc_session[86cf650fda0448f5]::config::EntryFnType)>, rustc_interface[69aa8c17999313ff]::passes::analysis::{closure#0}::{closure#0}::{closure#0}>
  55:     0x7fb8a9a93794 - <rustc_session[86cf650fda0448f5]::session::Session>::time::<(), rustc_interface[69aa8c17999313ff]::passes::analysis::{closure#0}>
  56:     0x7fb8a9a92014 - rustc_interface[69aa8c17999313ff]::passes::analysis
  57:     0x7fb8a9d3e3a2 - rustc_query_system[38efe1ae13b76606]::query::plumbing::try_execute_query::<rustc_query_impl[d894186be28c7657]::queries::analysis, rustc_query_impl[d894186be28c7657]::plumbing::QueryCtxt>
  58:     0x7fb8a9d3e0b0 - <rustc_query_impl[d894186be28c7657]::Queries as rustc_middle[74d31bc1c7288efd]::ty::query::QueryEngine>::analysis
  59:     0x7fb8a97ba90a - <rustc_middle[74d31bc1c7288efd]::ty::context::GlobalCtxt>::enter::<rustc_driver_impl[b4ece89b41fa04d8]::run_compiler::{closure#1}::{closure#2}::{closure#4}, core[a53159a38bb5d97c]::result::Result<(), rustc_span[5acbb0d3e38bbf81]::ErrorGuaranteed>>
  60:     0x7fb8a97b9b48 - <rustc_interface[69aa8c17999313ff]::interface::Compiler>::enter::<rustc_driver_impl[b4ece89b41fa04d8]::run_compiler::{closure#1}::{closure#2}, core[a53159a38bb5d97c]::result::Result<core[a53159a38bb5d97c]::option::Option<rustc_interface[69aa8c17999313ff]::queries::Linker>, rustc_span[5acbb0d3e38bbf81]::ErrorGuaranteed>>
  61:     0x7fb8a97b7b6f - rustc_span[5acbb0d3e38bbf81]::set_source_map::<core[a53159a38bb5d97c]::result::Result<(), rustc_span[5acbb0d3e38bbf81]::ErrorGuaranteed>, rustc_interface[69aa8c17999313ff]::interface::run_compiler<core[a53159a38bb5d97c]::result::Result<(), rustc_span[5acbb0d3e38bbf81]::ErrorGuaranteed>, rustc_driver_impl[b4ece89b41fa04d8]::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  62:     0x7fb8a97b7200 - std[b0e36382822581c2]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[69aa8c17999313ff]::util::run_in_thread_pool_with_globals<rustc_interface[69aa8c17999313ff]::interface::run_compiler<core[a53159a38bb5d97c]::result::Result<(), rustc_span[5acbb0d3e38bbf81]::ErrorGuaranteed>, rustc_driver_impl[b4ece89b41fa04d8]::run_compiler::{closure#1}>::{closure#0}, core[a53159a38bb5d97c]::result::Result<(), rustc_span[5acbb0d3e38bbf81]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[a53159a38bb5d97c]::result::Result<(), rustc_span[5acbb0d3e38bbf81]::ErrorGuaranteed>>
  63:     0x7fb8a97b6b21 - <<std[b0e36382822581c2]::thread::Builder>::spawn_unchecked_<rustc_interface[69aa8c17999313ff]::util::run_in_thread_pool_with_globals<rustc_interface[69aa8c17999313ff]::interface::run_compiler<core[a53159a38bb5d97c]::result::Result<(), rustc_span[5acbb0d3e38bbf81]::ErrorGuaranteed>, rustc_driver_impl[b4ece89b41fa04d8]::run_compiler::{closure#1}>::{closure#0}, core[a53159a38bb5d97c]::result::Result<(), rustc_span[5acbb0d3e38bbf81]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[a53159a38bb5d97c]::result::Result<(), rustc_span[5acbb0d3e38bbf81]::ErrorGuaranteed>>::{closure#1} as core[a53159a38bb5d97c]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  64:     0x7fb8a7376365 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h2b4cb02d9a218e1d
                               at /rustc/1c42cb4ef0544fbfaa500216e53382d6b079c001/library/alloc/src/boxed.rs:1962:9
  65:     0x7fb8a7376365 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hbd8144eacfab6e10
                               at /rustc/1c42cb4ef0544fbfaa500216e53382d6b079c001/library/alloc/src/boxed.rs:1962:9
  66:     0x7fb8a7376365 - std::sys::unix::thread::Thread::new::thread_start::h95499a4b2fca6f4a
                               at /rustc/1c42cb4ef0544fbfaa500216e53382d6b079c001/library/std/src/sys/unix/thread.rs:108:17
  67:     0x7fb8a7110bb5 - <unknown>
  68:     0x7fb8a7192d90 - <unknown>
  69:                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.71.0-nightly (1c42cb4ef 2023-04-26) running on x86_64-unknown-linux-gnu

query stack during panic:
#0 [limits] looking up limits
#1 [hir_crate] getting the crate HIR
end of query stack
thread panicked while panicking. aborting.

@matthiaskrgr matthiaskrgr added I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. C-bug Category: This is a bug. labels Apr 27, 2023
@clubby789
Copy link
Contributor

Further reduced:

fn wrap(self: Wrap<{ fn bar(&self) {} }>) -> &() {
  &()
}

@matthiaskrgr
Copy link
Member Author

searched toolchains nightly-2023-01-26 through nightly-2023-04-28
Regression in nightly-2023-01-29
searched toolchains ef98292 through 1e22541
Regression in 6cd6bad
#101692 cc @cjgillot

@cjgillot
Copy link
Contributor

@matthiaskrgr Are you sure? The linked PR does not touch parser nor lowering. It just touches typeck and what happens after it.

@matthiaskrgr
Copy link
Member Author

oh right, hm, I'm getting different results now, maybe I forgot to press ctrl+s on the bisection snippet... 🙃

searched toolchains nightly-2022-07-14 through nightly-2023-04-28

Regression in nightly-2022-07-26

commit[0] 2022-07-24: Auto merge of #99687 - RalfJung:rollup-bojacrc, r=RalfJung
commit[1] 2022-07-24: Auto merge of #99603 - fasterthanlime:ra-subtree-2, r=jyn514
commit[2] 2022-07-25: Auto merge of #97581 - AngelicosPhosphoros:improve_calloc_check_in_vec_macro_for_tuples, r=Mark-Simulacrum
commit[3] 2022-07-25: Auto merge of #99676 - thomcc:dont-overwrite, r=tmiasko
commit[4] 2022-07-25: Auto merge of #98770 - klensy:no-string-dupes-ugly, r=cjgillot
commit[5] 2022-07-25: Auto merge of #99600 - tmiasko:subst-folder, r=petrochenkov
commit[6] 2022-07-25: Auto merge of #99707 - JohnTitor:rollup-74rb8vq, r=JohnTitor
commit[7] 2022-07-25: Auto merge of #85673 - csmoe:export-exe-sym, r=bjorn3
commit[8] 2022-07-25: Auto merge of #99722 - RalfJung:miri, r=RalfJung
commit[9] 2022-07-25: Auto merge of #97313 - cjgillot:ast-lifetimes-anon, r=petrochenkov

maybe #97313 ?

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) ❄️ 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.

3 participants