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]: fluent string: argument lifetime_1 exists but was not referenced correctly #107088

Closed
1 of 4 tasks
matthiaskrgr opened this issue Jan 19, 2023 · 0 comments · Fixed by #107091
Closed
1 of 4 tasks
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

fn foo() -> impl Into<for<'a> fn(&'a ())> {
    (|_| {}) as for<'a> fn(_ )
}

Affected release channels

  • Previous Stable
  • Current Stable
  • Current Beta
  • Current Nightly

Rust Version

rustc 1.68.0-nightly (333ee6c46 2023-01-18)
binary: rustc
commit-hash: 333ee6c466972185973d5097f8b5fb0f9fb13fa5
commit-date: 2023-01-18
host: x86_64-unknown-linux-gnu
release: 1.68.0-nightly
LLVM version: 15.0.6

Current error output

No response

Backtrace

error[E0601]: `main` function not found in crate `ce07d43d0824ef1627fc3d0581e45b94bca99127`
 --> ce07d43d0824ef1627fc3d0581e45b94bca99127.rs:3:2
  |
3 | }
  |  ^ consider adding a `main` function to `ce07d43d0824ef1627fc3d0581e45b94bca99127.rs`

thread 'rustc' panicked at 'called `Result::unwrap()` on an `Err` value: failed while formatting fluent string `infer_actual_impl_expl_expected_other_some`:
argument `lifetime_1` exists but was not referenced correctly
help: try using `{$lifetime_1}` instead
', /rustc/333ee6c466972185973d5097f8b5fb0f9fb13fa5/compiler/rustc_errors/src/lib.rs:632:18
stack backtrace:
   0:     0x7ff0b4a6a3ca - std::backtrace_rs::backtrace::libunwind::trace::h50542de70121e929
                               at /rustc/333ee6c466972185973d5097f8b5fb0f9fb13fa5/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7ff0b4a6a3ca - std::backtrace_rs::backtrace::trace_unsynchronized::hae0fad0188b638fb
                               at /rustc/333ee6c466972185973d5097f8b5fb0f9fb13fa5/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7ff0b4a6a3ca - std::sys_common::backtrace::_print_fmt::h0db5adad57c4bf89
                               at /rustc/333ee6c466972185973d5097f8b5fb0f9fb13fa5/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7ff0b4a6a3ca - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h00bcafe34ad7431d
                               at /rustc/333ee6c466972185973d5097f8b5fb0f9fb13fa5/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7ff0b4acd67e - core::fmt::write::hac51cd027be97ada
                               at /rustc/333ee6c466972185973d5097f8b5fb0f9fb13fa5/library/core/src/fmt/mod.rs:1213:17
   5:     0x7ff0b4a5aa15 - std::io::Write::write_fmt::h3d0d4a9f33ed60b4
                               at /rustc/333ee6c466972185973d5097f8b5fb0f9fb13fa5/library/std/src/io/mod.rs:1682:15
   6:     0x7ff0b4a6a195 - std::sys_common::backtrace::_print::h91a5e2dc0c5534c6
                               at /rustc/333ee6c466972185973d5097f8b5fb0f9fb13fa5/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x7ff0b4a6a195 - std::sys_common::backtrace::print::hf5bbf2aee1aca335
                               at /rustc/333ee6c466972185973d5097f8b5fb0f9fb13fa5/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x7ff0b4a6cf5f - std::panicking::default_hook::{{closure}}::hb617088b31f5607b
                               at /rustc/333ee6c466972185973d5097f8b5fb0f9fb13fa5/library/std/src/panicking.rs:267:22
   9:     0x7ff0b4a6cc9b - std::panicking::default_hook::h8aabc36d33777a9f
                               at /rustc/333ee6c466972185973d5097f8b5fb0f9fb13fa5/library/std/src/panicking.rs:286:9
  10:     0x7ff0b38482e4 - <rustc_driver[3007fa38fe7f0954]::DEFAULT_HOOK::{closure#0}::{closure#0} as core[830d3b100652ecaa]::ops::function::FnOnce<(&core[830d3b100652ecaa]::panic::panic_info::PanicInfo,)>>::call_once::{shim:vtable#0}
  11:     0x7ff0b4a6d79a - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h73dc741209159f0b
                               at /rustc/333ee6c466972185973d5097f8b5fb0f9fb13fa5/library/alloc/src/boxed.rs:2002:9
  12:     0x7ff0b4a6d79a - std::panicking::rust_panic_with_hook::ha64a2ebee15afbaf
                               at /rustc/333ee6c466972185973d5097f8b5fb0f9fb13fa5/library/std/src/panicking.rs:692:13
  13:     0x7ff0b4a6d519 - std::panicking::begin_panic_handler::{{closure}}::h0e260611a29c4e4b
                               at /rustc/333ee6c466972185973d5097f8b5fb0f9fb13fa5/library/std/src/panicking.rs:579:13
  14:     0x7ff0b4a6a87c - std::sys_common::backtrace::__rust_end_short_backtrace::he6832640d64ae3e0
                               at /rustc/333ee6c466972185973d5097f8b5fb0f9fb13fa5/library/std/src/sys_common/backtrace.rs:137:18
  15:     0x7ff0b4a6d222 - rust_begin_unwind
                               at /rustc/333ee6c466972185973d5097f8b5fb0f9fb13fa5/library/std/src/panicking.rs:575:5
  16:     0x7ff0b4aca023 - core::panicking::panic_fmt::hab8eca7df403fce4
                               at /rustc/333ee6c466972185973d5097f8b5fb0f9fb13fa5/library/core/src/panicking.rs:64:14
  17:     0x7ff0b4aca5b3 - core::result::unwrap_failed::h3fb434f504c80690
                               at /rustc/333ee6c466972185973d5097f8b5fb0f9fb13fa5/library/core/src/result.rs:1790:5
  18:     0x7ff0b3bb9b3f - <rustc_errors[24ae80d350ed6ef3]::Handler>::eagerly_translate::<std[d57f0b25e837618f]::collections::hash::map::Iter<alloc[597172b2b0be2ffa]::borrow::Cow<str>, rustc_errors[24ae80d350ed6ef3]::diagnostic::DiagnosticArgValue>>
  19:     0x7ff0b3b8feaf - <rustc_infer[1a24f95b14ffce22]::errors::ActualImplExplNotes as rustc_errors[24ae80d350ed6ef3]::diagnostic::AddToDiagnostic>::add_to_diagnostic_with::<<rustc_errors[24ae80d350ed6ef3]::diagnostic::Diagnostic>::eager_subdiagnostic<rustc_infer[1a24f95b14ffce22]::errors::ActualImplExplNotes>::{closure#0}>
  20:     0x7ff0b3b904ca - <rustc_infer[1a24f95b14ffce22]::errors::TraitPlaceholderMismatch as rustc_errors[24ae80d350ed6ef3]::diagnostic_builder::IntoDiagnostic>::into_diagnostic
  21:     0x7ff0b3b284b8 - <rustc_infer[1a24f95b14ffce22]::infer::error_reporting::nice_region_error::NiceRegionError>::try_report_trait_placeholder_mismatch
  22:     0x7ff0b3b29c87 - <rustc_infer[1a24f95b14ffce22]::infer::error_reporting::nice_region_error::NiceRegionError>::try_report_from_nll
  23:     0x7ff0b366039e - rustc_borrowck[23af509549ebd80c]::diagnostics::bound_region_errors::try_extract_error_from_region_constraints::<<rustc_borrowck[23af509549ebd80c]::type_check::InstantiateOpaqueType as rustc_borrowck[23af509549ebd80c]::diagnostics::bound_region_errors::TypeOpInfo>::nice_error::{closure#0}, <rustc_borrowck[23af509549ebd80c]::type_check::InstantiateOpaqueType as rustc_borrowck[23af509549ebd80c]::diagnostics::bound_region_errors::TypeOpInfo>::nice_error::{closure#1}>
  24:     0x7ff0b3557634 - <rustc_borrowck[23af509549ebd80c]::type_check::InstantiateOpaqueType as rustc_borrowck[23af509549ebd80c]::diagnostics::bound_region_errors::TypeOpInfo>::nice_error
  25:     0x7ff0b355ebd9 - <rustc_borrowck[23af509549ebd80c]::type_check::InstantiateOpaqueType as rustc_borrowck[23af509549ebd80c]::diagnostics::bound_region_errors::TypeOpInfo>::report_error
  26:     0x7ff0b3658ea4 - <rustc_borrowck[23af509549ebd80c]::diagnostics::bound_region_errors::UniverseInfo>::report_error
  27:     0x7ff0b264ec57 - rustc_borrowck[23af509549ebd80c]::do_mir_borrowck
  28:     0x7ff0b262df05 - rustc_borrowck[23af509549ebd80c]::mir_borrowck
  29:     0x7ff0b21ee19d - rustc_query_system[1c311a51d396ff65]::query::plumbing::try_execute_query::<rustc_query_impl[d3da972c3560dd09]::queries::mir_borrowck, rustc_query_impl[d3da972c3560dd09]::plumbing::QueryCtxt>
  30:     0x7ff0b323b82d - <rustc_query_impl[d3da972c3560dd09]::Queries as rustc_middle[6fc96dfead90d7a7]::ty::query::QueryEngine>::mir_borrowck
  31:     0x7ff0b306ba5d - rustc_hir_analysis[4242f85aba23ed]::collect::type_of::type_of
  32:     0x7ff0b2188728 - rustc_query_system[1c311a51d396ff65]::query::plumbing::get_query::<rustc_query_impl[d3da972c3560dd09]::queries::type_of, rustc_query_impl[d3da972c3560dd09]::plumbing::QueryCtxt, rustc_middle[6fc96dfead90d7a7]::dep_graph::dep_node::DepKind>
  33:     0x7ff0b242334e - rustc_hir_analysis[4242f85aba23ed]::check::check::check_mod_item_types
  34:     0x7ff0b2e02251 - rustc_query_system[1c311a51d396ff65]::query::plumbing::try_execute_query::<rustc_query_impl[d3da972c3560dd09]::queries::check_mod_item_types, rustc_query_impl[d3da972c3560dd09]::plumbing::QueryCtxt>
  35:     0x7ff0b323ad8d - <rustc_query_impl[d3da972c3560dd09]::Queries as rustc_middle[6fc96dfead90d7a7]::ty::query::QueryEngine>::check_mod_item_types
  36:     0x7ff0b1e7b2e5 - <rustc_middle[6fc96dfead90d7a7]::hir::map::Map>::for_each_module::<rustc_hir_analysis[4242f85aba23ed]::check_crate::{closure#6}::{closure#0}>
  37:     0x7ff0b1e7add2 - rustc_hir_analysis[4242f85aba23ed]::check_crate
  38:     0x7ff0b1e7aa1b - rustc_interface[a3bd2224478d897e]::passes::analysis
  39:     0x7ff0b2fb57ee - rustc_query_system[1c311a51d396ff65]::query::plumbing::try_execute_query::<rustc_query_impl[d3da972c3560dd09]::queries::analysis, rustc_query_impl[d3da972c3560dd09]::plumbing::QueryCtxt>
  40:     0x7ff0b3237c1a - <rustc_query_impl[d3da972c3560dd09]::Queries as rustc_middle[6fc96dfead90d7a7]::ty::query::QueryEngine>::analysis
  41:     0x7ff0b2ad6a53 - <rustc_interface[a3bd2224478d897e]::passes::QueryContext>::enter::<rustc_driver[3007fa38fe7f0954]::run_compiler::{closure#1}::{closure#2}::{closure#2}, core[830d3b100652ecaa]::result::Result<(), rustc_errors[24ae80d350ed6ef3]::ErrorGuaranteed>>
  42:     0x7ff0b2ad54a8 - <rustc_interface[a3bd2224478d897e]::interface::Compiler>::enter::<rustc_driver[3007fa38fe7f0954]::run_compiler::{closure#1}::{closure#2}, core[830d3b100652ecaa]::result::Result<core[830d3b100652ecaa]::option::Option<rustc_interface[a3bd2224478d897e]::queries::Linker>, rustc_errors[24ae80d350ed6ef3]::ErrorGuaranteed>>
  43:     0x7ff0b2ad3328 - rustc_span[8b627345fe9560b3]::with_source_map::<core[830d3b100652ecaa]::result::Result<(), rustc_errors[24ae80d350ed6ef3]::ErrorGuaranteed>, rustc_interface[a3bd2224478d897e]::interface::run_compiler<core[830d3b100652ecaa]::result::Result<(), rustc_errors[24ae80d350ed6ef3]::ErrorGuaranteed>, rustc_driver[3007fa38fe7f0954]::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  44:     0x7ff0b2ad2e01 - <scoped_tls[919fbd9b743d1ab7]::ScopedKey<rustc_span[8b627345fe9560b3]::SessionGlobals>>::set::<rustc_interface[a3bd2224478d897e]::interface::run_compiler<core[830d3b100652ecaa]::result::Result<(), rustc_errors[24ae80d350ed6ef3]::ErrorGuaranteed>, rustc_driver[3007fa38fe7f0954]::run_compiler::{closure#1}>::{closure#0}, core[830d3b100652ecaa]::result::Result<(), rustc_errors[24ae80d350ed6ef3]::ErrorGuaranteed>>
  45:     0x7ff0b2ad23e2 - std[d57f0b25e837618f]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[a3bd2224478d897e]::util::run_in_thread_pool_with_globals<rustc_interface[a3bd2224478d897e]::interface::run_compiler<core[830d3b100652ecaa]::result::Result<(), rustc_errors[24ae80d350ed6ef3]::ErrorGuaranteed>, rustc_driver[3007fa38fe7f0954]::run_compiler::{closure#1}>::{closure#0}, core[830d3b100652ecaa]::result::Result<(), rustc_errors[24ae80d350ed6ef3]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[830d3b100652ecaa]::result::Result<(), rustc_errors[24ae80d350ed6ef3]::ErrorGuaranteed>>
  46:     0x7ff0b2ad218c - <<std[d57f0b25e837618f]::thread::Builder>::spawn_unchecked_<rustc_interface[a3bd2224478d897e]::util::run_in_thread_pool_with_globals<rustc_interface[a3bd2224478d897e]::interface::run_compiler<core[830d3b100652ecaa]::result::Result<(), rustc_errors[24ae80d350ed6ef3]::ErrorGuaranteed>, rustc_driver[3007fa38fe7f0954]::run_compiler::{closure#1}>::{closure#0}, core[830d3b100652ecaa]::result::Result<(), rustc_errors[24ae80d350ed6ef3]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[830d3b100652ecaa]::result::Result<(), rustc_errors[24ae80d350ed6ef3]::ErrorGuaranteed>>::{closure#1} as core[830d3b100652ecaa]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  47:     0x7ff0b4a77bd3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h7ba1652ef014411c
                               at /rustc/333ee6c466972185973d5097f8b5fb0f9fb13fa5/library/alloc/src/boxed.rs:1988:9
  48:     0x7ff0b4a77bd3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hb86249b0355c08e6
                               at /rustc/333ee6c466972185973d5097f8b5fb0f9fb13fa5/library/alloc/src/boxed.rs:1988:9
  49:     0x7ff0b4a77bd3 - std::sys::unix::thread::Thread::new::thread_start::h7258c93114561772
                               at /rustc/333ee6c466972185973d5097f8b5fb0f9fb13fa5/library/std/src/sys/unix/thread.rs:108:17
  50:     0x7ff0b046a8fd - <unknown>
  51:     0x7ff0b04eca60 - <unknown>
  52:                0x0 - <unknown>

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.68.0-nightly (333ee6c46 2023-01-18) running on x86_64-unknown-linux-gnu

query stack during panic:
#0 [mir_borrowck] borrow-checking `foo`
#1 [type_of] computing type of `foo::{opaque#0}`
#2 [check_mod_item_types] checking item types in top-level module
#3 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to previous error

For more information about this error, try `rustc --explain E0601`.

Anything else?

No response

@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 Jan 19, 2023
@bors bors closed this as completed in c42fad8 Jan 20, 2023
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.

1 participant