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: asked to assemble builtin bounds of unexpected type: Placeholder(Placeholder { ... non_lifetime_binders #108180

Closed
matthiaskrgr opened this issue Feb 17, 2023 · 4 comments · Fixed by #108189
Assignees
Labels
C-bug Category: This is a bug. F-non_lifetime_binders `#![feature(non_lifetime_binders)]` 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

matthiaskrgr commented Feb 17, 2023

Code

#![feature(non_lifetime_binders)]
pub fn V<V>(value: &V) -> Result<String, &Ok>{}

Meta

rustc --version --verbose:

rustc 1.69.0-nightly (f4f5fc3e5 2023-02-17)
binary: rustc
commit-hash: f4f5fc3e5cc70b7a43bf7b518c455f3d9bada9e3
commit-date: 2023-02-17
host: x86_64-unknown-linux-gnu
release: 1.69.0-nightly
LLVM version: 15.0.7

Error output

meh
Backtrace

error: internal compiler error: compiler/rustc_trait_selection/src/traits/select/mod.rs:2157:17: asked to assemble builtin bounds of unexpected type: Placeholder(Placeholder { universe: U1, name: Param(DefId(0:5 ~ 9d3cc313aa5fe95f721ef30c9a732644292ba048[7297]::V::V#1), "V") })

thread 'rustc' panicked at 'Box<dyn Any>', /rustc/f4f5fc3e5cc70b7a43bf7b518c455f3d9bada9e3/compiler/rustc_errors/src/lib.rs:1642:9
stack backtrace:
   0:     0x7f6e04b6aa5a - std::backtrace_rs::backtrace::libunwind::trace::hebe09041f884c65d
                               at /rustc/f4f5fc3e5cc70b7a43bf7b518c455f3d9bada9e3/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f6e04b6aa5a - std::backtrace_rs::backtrace::trace_unsynchronized::h546f6c63cbbce5a9
                               at /rustc/f4f5fc3e5cc70b7a43bf7b518c455f3d9bada9e3/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f6e04b6aa5a - std::sys_common::backtrace::_print_fmt::h2559cb0cfed7a617
                               at /rustc/f4f5fc3e5cc70b7a43bf7b518c455f3d9bada9e3/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7f6e04b6aa5a - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h1fb4eaaaafa2d72a
                               at /rustc/f4f5fc3e5cc70b7a43bf7b518c455f3d9bada9e3/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f6e04bca9ae - core::fmt::write::hbaef4432b3c9d07b
                               at /rustc/f4f5fc3e5cc70b7a43bf7b518c455f3d9bada9e3/library/core/src/fmt/mod.rs:1232:17
   5:     0x7f6e04b5ae05 - std::io::Write::write_fmt::h1f8dce362441faaa
                               at /rustc/f4f5fc3e5cc70b7a43bf7b518c455f3d9bada9e3/library/std/src/io/mod.rs:1684:15
   6:     0x7f6e04b6a825 - std::sys_common::backtrace::_print::hc0e92ab849a4f4e1
                               at /rustc/f4f5fc3e5cc70b7a43bf7b518c455f3d9bada9e3/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x7f6e04b6a825 - std::sys_common::backtrace::print::h878cd11684ebdec3
                               at /rustc/f4f5fc3e5cc70b7a43bf7b518c455f3d9bada9e3/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x7f6e04b6d59f - std::panicking::default_hook::{{closure}}::h2ea8a6875aa6312d
                               at /rustc/f4f5fc3e5cc70b7a43bf7b518c455f3d9bada9e3/library/std/src/panicking.rs:267:22
   9:     0x7f6e04b6d2db - std::panicking::default_hook::h9e42277a84072188
                               at /rustc/f4f5fc3e5cc70b7a43bf7b518c455f3d9bada9e3/library/std/src/panicking.rs:286:9
  10:     0x7f6e07e6e7b4 - <rustc_driver_impl[afa3c304d692170b]::DEFAULT_HOOK::{closure#0}::{closure#0} as core[ebab21900c9c0a2]::ops::function::FnOnce<(&core[ebab21900c9c0a2]::panic::panic_info::PanicInfo,)>>::call_once::{shim:vtable#0}
  11:     0x7f6e04b6dddd - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h2c34f129ed413128
                               at /rustc/f4f5fc3e5cc70b7a43bf7b518c455f3d9bada9e3/library/alloc/src/boxed.rs:2002:9
  12:     0x7f6e04b6dddd - std::panicking::rust_panic_with_hook::h4c799b8c4fc0a70b
                               at /rustc/f4f5fc3e5cc70b7a43bf7b518c455f3d9bada9e3/library/std/src/panicking.rs:692:13
  13:     0x7f6e084274a1 - std[dc63ca99f82ce43d]::panicking::begin_panic::<rustc_errors[faa449d960b5ce55]::ExplicitBug>::{closure#0}
  14:     0x7f6e0841f116 - std[dc63ca99f82ce43d]::sys_common::backtrace::__rust_end_short_backtrace::<std[dc63ca99f82ce43d]::panicking::begin_panic<rustc_errors[faa449d960b5ce55]::ExplicitBug>::{closure#0}, !>
  15:     0x7f6e08379fe6 - std[dc63ca99f82ce43d]::panicking::begin_panic::<rustc_errors[faa449d960b5ce55]::ExplicitBug>
  16:     0x7f6e0841ed96 - std[dc63ca99f82ce43d]::panic::panic_any::<rustc_errors[faa449d960b5ce55]::ExplicitBug>
  17:     0x7f6e0841d906 - <rustc_errors[faa449d960b5ce55]::HandlerInner>::bug::<&alloc[d840872249f3dc84]::string::String>
  18:     0x7f6e0841d5d0 - <rustc_errors[faa449d960b5ce55]::Handler>::bug::<&alloc[d840872249f3dc84]::string::String>
  19:     0x7f6e08484b1b - rustc_middle[6caff671bb338453]::util::bug::opt_span_bug_fmt::<rustc_span[1010a352e5466fad]::span_encoding::Span>::{closure#0}
  20:     0x7f6e084842da - rustc_middle[6caff671bb338453]::ty::context::tls::with_opt::<rustc_middle[6caff671bb338453]::util::bug::opt_span_bug_fmt<rustc_span[1010a352e5466fad]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  21:     0x7f6e084842a6 - rustc_middle[6caff671bb338453]::ty::context::tls::with_context_opt::<rustc_middle[6caff671bb338453]::ty::context::tls::with_opt<rustc_middle[6caff671bb338453]::util::bug::opt_span_bug_fmt<rustc_span[1010a352e5466fad]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  22:     0x7f6e08484a66 - rustc_middle[6caff671bb338453]::util::bug::opt_span_bug_fmt::<rustc_span[1010a352e5466fad]::span_encoding::Span>
  23:     0x7f6e06141083 - rustc_middle[6caff671bb338453]::util::bug::bug_fmt
  24:     0x7f6e06185906 - <rustc_trait_selection[b19fab792c1f9feb]::traits::select::SelectionContext>::assemble_candidates
  25:     0x7f6e0615a9fe - <rustc_trait_selection[b19fab792c1f9feb]::traits::select::SelectionContext>::candidate_from_obligation_no_cache
  26:     0x7f6e06b48ac2 - <rustc_query_system[5ff89444bbfc32f5]::dep_graph::graph::DepGraph<rustc_middle[6caff671bb338453]::dep_graph::dep_node::DepKind>>::with_anon_task::<rustc_middle[6caff671bb338453]::ty::context::TyCtxt, <rustc_trait_selection[b19fab792c1f9feb]::traits::select::SelectionContext>::in_task<<rustc_trait_selection[b19fab792c1f9feb]::traits::select::SelectionContext>::candidate_from_obligation::{closure#0}::{closure#0}, core[ebab21900c9c0a2]::result::Result<core[ebab21900c9c0a2]::option::Option<rustc_middle[6caff671bb338453]::traits::select::SelectionCandidate>, rustc_middle[6caff671bb338453]::traits::SelectionError>>::{closure#0}, core[ebab21900c9c0a2]::result::Result<core[ebab21900c9c0a2]::option::Option<rustc_middle[6caff671bb338453]::traits::select::SelectionCandidate>, rustc_middle[6caff671bb338453]::traits::SelectionError>>
  27:     0x7f6e06b43530 - <rustc_trait_selection[b19fab792c1f9feb]::traits::select::SelectionContext>::evaluate_stack
  28:     0x7f6e06b418d8 - <rustc_query_system[5ff89444bbfc32f5]::dep_graph::graph::DepGraph<rustc_middle[6caff671bb338453]::dep_graph::dep_node::DepKind>>::with_anon_task::<rustc_middle[6caff671bb338453]::ty::context::TyCtxt, <rustc_trait_selection[b19fab792c1f9feb]::traits::select::SelectionContext>::in_task<<rustc_trait_selection[b19fab792c1f9feb]::traits::select::SelectionContext>::evaluate_trait_predicate_recursively::{closure#0}::{closure#2}, core[ebab21900c9c0a2]::result::Result<rustc_middle[6caff671bb338453]::traits::select::EvaluationResult, rustc_middle[6caff671bb338453]::traits::select::OverflowError>>::{closure#0}, core[ebab21900c9c0a2]::result::Result<rustc_middle[6caff671bb338453]::traits::select::EvaluationResult, rustc_middle[6caff671bb338453]::traits::select::OverflowError>>
  29:     0x7f6e06b3c9e7 - <rustc_trait_selection[b19fab792c1f9feb]::traits::select::SelectionContext>::evaluate_predicates_recursively::<alloc[d840872249f3dc84]::vec::into_iter::IntoIter<rustc_infer[92cb48f58201d890]::traits::Obligation<rustc_middle[6caff671bb338453]::ty::Predicate>>>
  30:     0x7f6e06b3a29d - <rustc_infer[92cb48f58201d890]::infer::InferCtxt>::probe::<core[ebab21900c9c0a2]::result::Result<rustc_middle[6caff671bb338453]::traits::select::EvaluationResult, rustc_middle[6caff671bb338453]::traits::select::OverflowError>, <rustc_trait_selection[b19fab792c1f9feb]::traits::select::SelectionContext>::evaluation_probe<<rustc_trait_selection[b19fab792c1f9feb]::traits::select::SelectionContext>::evaluate_candidate::{closure#0}::{closure#0}>::{closure#0}>
  31:     0x7f6e0617e798 - <alloc[d840872249f3dc84]::vec::Vec<rustc_trait_selection[b19fab792c1f9feb]::traits::select::EvaluatedCandidate> as alloc[d840872249f3dc84]::vec::spec_from_iter::SpecFromIter<rustc_trait_selection[b19fab792c1f9feb]::traits::select::EvaluatedCandidate, core[ebab21900c9c0a2]::iter::adapters::GenericShunt<core[ebab21900c9c0a2]::iter::adapters::flatten::FlatMap<core[ebab21900c9c0a2]::iter::adapters::map::Map<alloc[d840872249f3dc84]::vec::into_iter::IntoIter<rustc_middle[6caff671bb338453]::traits::select::SelectionCandidate>, <rustc_trait_selection[b19fab792c1f9feb]::traits::select::SelectionContext>::candidate_from_obligation_no_cache::{closure#0}>, core[ebab21900c9c0a2]::option::Option<core[ebab21900c9c0a2]::result::Result<rustc_trait_selection[b19fab792c1f9feb]::traits::select::EvaluatedCandidate, rustc_middle[6caff671bb338453]::traits::SelectionError>>, <core[ebab21900c9c0a2]::result::Result<core[ebab21900c9c0a2]::option::Option<rustc_trait_selection[b19fab792c1f9feb]::traits::select::EvaluatedCandidate>, rustc_middle[6caff671bb338453]::traits::SelectionError>>::transpose>, core[ebab21900c9c0a2]::result::Result<core[ebab21900c9c0a2]::convert::Infallible, rustc_middle[6caff671bb338453]::traits::SelectionError>>>>::from_iter
  32:     0x7f6e0615b169 - <rustc_trait_selection[b19fab792c1f9feb]::traits::select::SelectionContext>::candidate_from_obligation_no_cache
  33:     0x7f6e06b48ac2 - <rustc_query_system[5ff89444bbfc32f5]::dep_graph::graph::DepGraph<rustc_middle[6caff671bb338453]::dep_graph::dep_node::DepKind>>::with_anon_task::<rustc_middle[6caff671bb338453]::ty::context::TyCtxt, <rustc_trait_selection[b19fab792c1f9feb]::traits::select::SelectionContext>::in_task<<rustc_trait_selection[b19fab792c1f9feb]::traits::select::SelectionContext>::candidate_from_obligation::{closure#0}::{closure#0}, core[ebab21900c9c0a2]::result::Result<core[ebab21900c9c0a2]::option::Option<rustc_middle[6caff671bb338453]::traits::select::SelectionCandidate>, rustc_middle[6caff671bb338453]::traits::SelectionError>>::{closure#0}, core[ebab21900c9c0a2]::result::Result<core[ebab21900c9c0a2]::option::Option<rustc_middle[6caff671bb338453]::traits::select::SelectionCandidate>, rustc_middle[6caff671bb338453]::traits::SelectionError>>
  34:     0x7f6e06b43530 - <rustc_trait_selection[b19fab792c1f9feb]::traits::select::SelectionContext>::evaluate_stack
  35:     0x7f6e06b418d8 - <rustc_query_system[5ff89444bbfc32f5]::dep_graph::graph::DepGraph<rustc_middle[6caff671bb338453]::dep_graph::dep_node::DepKind>>::with_anon_task::<rustc_middle[6caff671bb338453]::ty::context::TyCtxt, <rustc_trait_selection[b19fab792c1f9feb]::traits::select::SelectionContext>::in_task<<rustc_trait_selection[b19fab792c1f9feb]::traits::select::SelectionContext>::evaluate_trait_predicate_recursively::{closure#0}::{closure#2}, core[ebab21900c9c0a2]::result::Result<rustc_middle[6caff671bb338453]::traits::select::EvaluationResult, rustc_middle[6caff671bb338453]::traits::select::OverflowError>>::{closure#0}, core[ebab21900c9c0a2]::result::Result<rustc_middle[6caff671bb338453]::traits::select::EvaluationResult, rustc_middle[6caff671bb338453]::traits::select::OverflowError>>
  36:     0x7f6e069aaf1d - <rustc_trait_selection[b19fab792c1f9feb]::traits::select::SelectionContext>::evaluate_predicate_recursively
  37:     0x7f6e069a89d3 - <rustc_infer[92cb48f58201d890]::infer::InferCtxt>::probe::<core[ebab21900c9c0a2]::result::Result<rustc_middle[6caff671bb338453]::traits::select::EvaluationResult, rustc_middle[6caff671bb338453]::traits::select::OverflowError>, <rustc_trait_selection[b19fab792c1f9feb]::traits::select::SelectionContext>::evaluation_probe<<rustc_trait_selection[b19fab792c1f9feb]::traits::select::SelectionContext>::evaluate_root_obligation::{closure#0}>::{closure#0}>
  38:     0x7f6e064e76ae - rustc_traits[a45c351126c3b9ce]::evaluate_obligation::evaluate_obligation
  39:     0x7f6e064e2f66 - rustc_query_system[5ff89444bbfc32f5]::query::plumbing::get_query::<rustc_query_impl[ef929ccf3c28623b]::queries::evaluate_obligation, rustc_query_impl[ef929ccf3c28623b]::plumbing::QueryCtxt, rustc_middle[6caff671bb338453]::dep_graph::dep_node::DepKind>
  40:     0x7f6e061a7645 - <rustc_infer[92cb48f58201d890]::infer::InferCtxt as rustc_trait_selection[b19fab792c1f9feb]::traits::query::evaluate_obligation::InferCtxtExt>::predicate_must_hold_considering_regions
  41:     0x7f6e0610011b - <rustc_trait_selection[b19fab792c1f9feb]::traits::fulfill::FulfillProcessor as rustc_data_structures[cd995ba5556f5758]::obligation_forest::ObligationProcessor>::process_obligation
  42:     0x7f6e060f8d0f - <rustc_data_structures[cd995ba5556f5758]::obligation_forest::ObligationForest<rustc_trait_selection[b19fab792c1f9feb]::traits::fulfill::PendingPredicateObligation>>::process_obligations::<rustc_trait_selection[b19fab792c1f9feb]::traits::fulfill::FulfillProcessor>
  43:     0x7f6e060f87c8 - <rustc_trait_selection[b19fab792c1f9feb]::traits::fulfill::FulfillmentContext as rustc_infer[92cb48f58201d890]::traits::engine::TraitEngine>::select_where_possible
  44:     0x7f6e060e3940 - <rustc_hir_typeck[59924f8822ff3497]::fn_ctxt::FnCtxt>::check_argument_types
  45:     0x7f6e060b8151 - <rustc_hir_typeck[59924f8822ff3497]::fn_ctxt::FnCtxt>::check_call
  46:     0x7f6e061fb001 - <rustc_hir_typeck[59924f8822ff3497]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  47:     0x7f6e06225080 - <rustc_hir_typeck[59924f8822ff3497]::fn_ctxt::FnCtxt>::check_block_with_expected
  48:     0x7f6e061fb52e - <rustc_hir_typeck[59924f8822ff3497]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  49:     0x7f6e065b689b - <rustc_hir_typeck[59924f8822ff3497]::fn_ctxt::FnCtxt>::check_return_expr
  50:     0x7f6e065aeb12 - rustc_hir_typeck[59924f8822ff3497]::check::check_fn
  51:     0x7f6e06598ef2 - <rustc_hir_typeck[59924f8822ff3497]::inherited::InheritedBuilder>::enter::<rustc_hir_typeck[59924f8822ff3497]::typeck_with_fallback<rustc_hir_typeck[59924f8822ff3497]::typeck::{closure#0}>::{closure#0}::{closure#1}, &rustc_middle[6caff671bb338453]::ty::typeck_results::TypeckResults>
  52:     0x7f6e0658da16 - rustc_hir_typeck[59924f8822ff3497]::typeck
  53:     0x7f6e0658c113 - rustc_query_system[5ff89444bbfc32f5]::query::plumbing::try_execute_query::<rustc_query_impl[ef929ccf3c28623b]::queries::typeck, rustc_query_impl[ef929ccf3c28623b]::plumbing::QueryCtxt>
  54:     0x7f6e075f0f8b - rustc_data_structures[cd995ba5556f5758]::sync::par_for_each_in::<&[rustc_span[1010a352e5466fad]::def_id::LocalDefId], <rustc_middle[6caff671bb338453]::hir::map::Map>::par_body_owners<rustc_hir_typeck[59924f8822ff3497]::typeck_item_bodies::{closure#0}>::{closure#0}>
  55:     0x7f6e075f0dcf - rustc_hir_typeck[59924f8822ff3497]::typeck_item_bodies
  56:     0x7f6e0746fca3 - rustc_query_system[5ff89444bbfc32f5]::query::plumbing::try_execute_query::<rustc_query_impl[ef929ccf3c28623b]::queries::typeck_item_bodies, rustc_query_impl[ef929ccf3c28623b]::plumbing::QueryCtxt>
  57:     0x7f6e0786e59b - <rustc_query_impl[ef929ccf3c28623b]::Queries as rustc_middle[6caff671bb338453]::ty::query::QueryEngine>::typeck_item_bodies
  58:     0x7f6e063136a3 - <rustc_session[66793dd6b8780a4a]::session::Session>::time::<(), rustc_hir_analysis[257f64c795d1d076]::check_crate::{closure#7}>
  59:     0x7f6e063106a2 - rustc_hir_analysis[257f64c795d1d076]::check_crate
  60:     0x7f6e06306062 - rustc_interface[686dab9608bc6033]::passes::analysis
  61:     0x7f6e07663d92 - rustc_query_system[5ff89444bbfc32f5]::query::plumbing::try_execute_query::<rustc_query_impl[ef929ccf3c28623b]::queries::analysis, rustc_query_impl[ef929ccf3c28623b]::plumbing::QueryCtxt>
  62:     0x7f6e07867e2a - <rustc_query_impl[ef929ccf3c28623b]::Queries as rustc_middle[6caff671bb338453]::ty::query::QueryEngine>::analysis
  63:     0x7f6e07080303 - <rustc_interface[686dab9608bc6033]::queries::QueryResult<&rustc_middle[6caff671bb338453]::ty::context::GlobalCtxt>>::enter::<core[ebab21900c9c0a2]::result::Result<(), rustc_errors[faa449d960b5ce55]::ErrorGuaranteed>, rustc_driver_impl[afa3c304d692170b]::run_compiler::{closure#1}::{closure#2}::{closure#3}>
  64:     0x7f6e0707f4d4 - <rustc_interface[686dab9608bc6033]::interface::Compiler>::enter::<rustc_driver_impl[afa3c304d692170b]::run_compiler::{closure#1}::{closure#2}, core[ebab21900c9c0a2]::result::Result<core[ebab21900c9c0a2]::option::Option<rustc_interface[686dab9608bc6033]::queries::Linker>, rustc_errors[faa449d960b5ce55]::ErrorGuaranteed>>
  65:     0x7f6e0707a6f4 - rustc_span[1010a352e5466fad]::with_source_map::<core[ebab21900c9c0a2]::result::Result<(), rustc_errors[faa449d960b5ce55]::ErrorGuaranteed>, rustc_interface[686dab9608bc6033]::interface::run_compiler<core[ebab21900c9c0a2]::result::Result<(), rustc_errors[faa449d960b5ce55]::ErrorGuaranteed>, rustc_driver_impl[afa3c304d692170b]::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  66:     0x7f6e0707a204 - <scoped_tls[d487b98c36b0d138]::ScopedKey<rustc_span[1010a352e5466fad]::SessionGlobals>>::set::<rustc_interface[686dab9608bc6033]::interface::run_compiler<core[ebab21900c9c0a2]::result::Result<(), rustc_errors[faa449d960b5ce55]::ErrorGuaranteed>, rustc_driver_impl[afa3c304d692170b]::run_compiler::{closure#1}>::{closure#0}, core[ebab21900c9c0a2]::result::Result<(), rustc_errors[faa449d960b5ce55]::ErrorGuaranteed>>
  67:     0x7f6e07079902 - std[dc63ca99f82ce43d]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[686dab9608bc6033]::util::run_in_thread_pool_with_globals<rustc_interface[686dab9608bc6033]::interface::run_compiler<core[ebab21900c9c0a2]::result::Result<(), rustc_errors[faa449d960b5ce55]::ErrorGuaranteed>, rustc_driver_impl[afa3c304d692170b]::run_compiler::{closure#1}>::{closure#0}, core[ebab21900c9c0a2]::result::Result<(), rustc_errors[faa449d960b5ce55]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[ebab21900c9c0a2]::result::Result<(), rustc_errors[faa449d960b5ce55]::ErrorGuaranteed>>
  68:     0x7f6e070796ac - <<std[dc63ca99f82ce43d]::thread::Builder>::spawn_unchecked_<rustc_interface[686dab9608bc6033]::util::run_in_thread_pool_with_globals<rustc_interface[686dab9608bc6033]::interface::run_compiler<core[ebab21900c9c0a2]::result::Result<(), rustc_errors[faa449d960b5ce55]::ErrorGuaranteed>, rustc_driver_impl[afa3c304d692170b]::run_compiler::{closure#1}>::{closure#0}, core[ebab21900c9c0a2]::result::Result<(), rustc_errors[faa449d960b5ce55]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[ebab21900c9c0a2]::result::Result<(), rustc_errors[faa449d960b5ce55]::ErrorGuaranteed>>::{closure#1} as core[ebab21900c9c0a2]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  69:     0x7f6e04b77c63 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h9fd36c4a0ba5b15d
                               at /rustc/f4f5fc3e5cc70b7a43bf7b518c455f3d9bada9e3/library/alloc/src/boxed.rs:1988:9
  70:     0x7f6e04b77c63 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hd37d267854c7434f
                               at /rustc/f4f5fc3e5cc70b7a43bf7b518c455f3d9bada9e3/library/alloc/src/boxed.rs:1988:9
  71:     0x7f6e04b77c63 - std::sys::unix::thread::Thread::new::thread_start::h1ff24d5a09f2a8be
                               at /rustc/f4f5fc3e5cc70b7a43bf7b518c455f3d9bada9e3/library/std/src/sys/unix/thread.rs:108:17
  72:     0x7f6e04907bb5 - <unknown>
  73:     0x7f6e04989d90 - <unknown>
  74:                0x0 - <unknown>

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.69.0-nightly (f4f5fc3e5 2023-02-17) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z crate-attr=feature(non_lifetime_binders)

query stack during panic:
#0 [evaluate_obligation] evaluating trait selection obligation `V: core::iter::traits::collect::IntoIterator`
#1 [typeck] type-checking `V`
#2 [typeck_item_bodies] type-checking all item bodies
#3 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 22 previous errors; 2 warnings emitted

Some errors have detailed explanations: E0261, E0428, E0573, E0576, E0601, E0637.
For more information about an error, try `rustc --explain E0261`.

@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. S-has-mcve Status: A Minimal Complete and Verifiable Example has been found for this issue labels Feb 17, 2023
@compiler-errors
Copy link
Member

compiler-errors commented Feb 17, 2023

I can't reproduce this? On master, that is.

@matthiaskrgr
Copy link
Member Author

Ah oops, looks like I minimized wrongly, give me a sec...

@compiler-errors compiler-errors removed the S-has-mcve Status: A Minimal Complete and Verifiable Example has been found for this issue label Feb 17, 2023
@matthiaskrgr
Copy link
Member Author

This should do:

#![feature(non_lifetime_binders)]
#![crate_type = "lib"]

pub fn String<V>(elem)
where
    V: 'a,
    for<V> V: IntoIterator,
    for<value> <&str as IntoIterator>::Item: 'a + 'static,
{
        let csv_str: value = String.into_iter().elem::<String>();
}

fn main() {}

@compiler-errors
Copy link
Member

compiler-errors commented Feb 17, 2023

Minimized --

#![feature(non_lifetime_binders)]

pub fn foo()
where
    for<V> V: Sized,
{
}

fn main() {
    foo();
}

PR coming up.

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. F-non_lifetime_binders `#![feature(non_lifetime_binders)]` 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