Skip to content

cannot relate bound region: '_#0r <= ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed(DefId(0:351 ~ e24_epd[cbd0]::serial_1::serial_2::{impl#0}::split_method::{opaque#0}::'_#1), '_) }) #109930

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

Closed
mschnell1 opened this issue Apr 4, 2023 · 10 comments
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

@mschnell1
Copy link

Code

Supposedly this snipped is critical:
impl<T: SPort + 'static> Serial<T>
   pub fn split_method(
        &mut self,
    ) -> (
        impl Fn(&mut Rx<dyn SPortRx>) -> std::result::Result<u8, nb::Error<std::io::Error>>,
        impl Fn(&mut Tx<T>, u8) -> std::result::Result<(), nb::Error<std::io::Error>>,
    ) {
        let rx = Rx::read;
        let tx = Tx::write;
        (rx, tx)
    }
}

Meta

rustc --version --verbose:

rustc 1.68.0 (2c8cc3432 2023-03-06)
binary: rustc
commit-hash: 2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74
commit-date: 2023-03-06
host: x86_64-pc-windows-msvc
release: 1.68.0
LLVM version: 15.0.6

Error output

error: internal compiler error: compiler\rustc_infer\src\infer\region_constraints\mod.rs:568:17: cannot relate bound region: '_#0r <= ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed(DefId(0:351 ~ e24_epd[cbd0]::serial_1::serial_2::{impl#0}::split_method::{opaque#0}::'_#1), '_) })

thread 'rustc' panicked at 'Box<dyn Any>', /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74\compiler\rustc_errors\src\lib.rs:987:33
stack backtrace:
   0:     0x7ff8664d9d02 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h792a027c2747e99d
   1:     0x7ff86651570b - core::fmt::write::h5d1fd4698cef7a98
   2:     0x7ff8664ccdfa - <std::io::IoSlice as core::fmt::Debug>::fmt::hba64fac32bc54252
   3:     0x7ff8664d9a4b - std::sys::common::alloc::realloc_fallback::hfe62d187ace61bcd
   4:     0x7ff8664dd3f9 - std::panicking::default_hook::hc7b7ee9dc8a166a2
   5:     0x7ff8664dd07b - std::panicking::default_hook::hc7b7ee9dc8a166a2
   6:     0x7ff8335dec34 - rustc_driver[6fce53b951639747]::describe_lints
   7:     0x7ff8664ddd5f - std::panicking::rust_panic_with_hook::h80ad08272951bba3
   8:     0x7ff833939a73 - <<rustc_infer[1d2eee8e62f18ba3]::infer::error_reporting::TypeErrCtxt>::construct_generic_bound_failure::SubOrigin as core[ab957a7126758ba9]::fmt::Debug>::fmt
   9:     0x7ff833937c79 - <<rustc_infer[1d2eee8e62f18ba3]::infer::error_reporting::TypeErrCtxt>::construct_generic_bound_failure::SubOrigin as core[ab957a7126758ba9]::fmt::Debug>::fmt
  10:     0x7ff833937c19 - <<rustc_infer[1d2eee8e62f18ba3]::infer::error_reporting::TypeErrCtxt>::construct_generic_bound_failure::SubOrigin as core[ab957a7126758ba9]::fmt::Debug>::fmt
  11:     0x7ff833937c09 - <<rustc_infer[1d2eee8e62f18ba3]::infer::error_reporting::TypeErrCtxt>::construct_generic_bound_failure::SubOrigin as core[ab957a7126758ba9]::fmt::Debug>::fmt
  12:     0x7ff833937270 - <<rustc_infer[1d2eee8e62f18ba3]::infer::error_reporting::TypeErrCtxt>::construct_generic_bound_failure::SubOrigin as core[ab957a7126758ba9]::fmt::Debug>::fmt
  13:     0x7ff8339370c9 - <<rustc_infer[1d2eee8e62f18ba3]::infer::error_reporting::TypeErrCtxt>::construct_generic_bound_failure::SubOrigin as core[ab957a7126758ba9]::fmt::Debug>::fmt
  14:     0x7ff8338e27e9 - <rustc_infer[1d2eee8e62f18ba3]::traits::project::ProjectionCacheEntry as core[ab957a7126758ba9]::fmt::Debug>::fmt
  15:     0x7ff8338e284d - <rustc_infer[1d2eee8e62f18ba3]::traits::project::ProjectionCacheEntry as core[ab957a7126758ba9]::fmt::Debug>::fmt
  16:     0x7ff8338e19ff - <rustc_infer[1d2eee8e62f18ba3]::traits::project::ProjectionCacheEntry as core[ab957a7126758ba9]::fmt::Debug>::fmt
  17:     0x7ff8338e19a8 - <rustc_infer[1d2eee8e62f18ba3]::traits::project::ProjectionCacheEntry as core[ab957a7126758ba9]::fmt::Debug>::fmt
  18:     0x7ff8338e1966 - <rustc_infer[1d2eee8e62f18ba3]::traits::project::ProjectionCacheEntry as core[ab957a7126758ba9]::fmt::Debug>::fmt
  19:     0x7ff831babde8 - rustc_infer[1d2eee8e62f18ba3]::traits::util::supertraits
  20:     0x7ff831bdea09 - <rustc_infer[1d2eee8e62f18ba3]::infer::outlives::verify::VerifyBoundCx>::alias_bound
  21:     0x7ff831bd6748 - <rustc_infer[1d2eee8e62f18ba3]::infer::equate::Equate as rustc_middle[484603f84bd5edf8]::ty::relate::TypeRelation>::tys
  22:     0x7ff830ddeb38 - rustc_trait_selection[48a8fb49e3ee715f]::traits::wf::object_region_bounds
  23:     0x7ff830df6358 - rustc_trait_selection[48a8fb49e3ee715f]::traits::structural_match::search_for_adt_const_param_violation
  24:     0x7ff834214f08 - <rustc_trait_selection[48a8fb49e3ee715f]::traits::wf::Elaborate as core[ab957a7126758ba9]::fmt::Debug>::fmt
  25:     0x7ff8341fae09 - <rustc_trait_selection[48a8fb49e3ee715f]::traits::error_reporting::method_chain::CollectAllMismatches as rustc_middle[484603f84bd5edf8]::ty::relate::TypeRelation>::consts
  26:     0x7ff83428bed0 - <rustc_infer[1d2eee8e62f18ba3]::infer::error_reporting::TypeErrCtxt as rustc_trait_selection[48a8fb49e3ee715f]::traits::error_reporting::suggestions::TypeErrCtxtExt>::report_closure_arg_mismatch
  27:     0x7ff83429ee96 - <rustc_infer[1d2eee8e62f18ba3]::infer::error_reporting::TypeErrCtxt as rustc_trait_selection[48a8fb49e3ee715f]::traits::error_reporting::TypeErrCtxtExt>::report_selection_error
  28:     0x7ff8342ab537 - <rustc_infer[1d2eee8e62f18ba3]::infer::error_reporting::TypeErrCtxt as rustc_trait_selection[48a8fb49e3ee715f]::traits::error_reporting::InferCtxtPrivExt>::report_fulfillment_error 
  29:     0x7ff83429b96d - <rustc_infer[1d2eee8e62f18ba3]::infer::error_reporting::TypeErrCtxt as rustc_trait_selection[48a8fb49e3ee715f]::traits::error_reporting::TypeErrCtxtExt>::report_fulfillment_errors  
  30:     0x7ff831a43081 - <rustc_hir_typeck[726d463412e15d63]::fn_ctxt::FnCtxt>::demand_coerce
  31:     0x7ff831a443d9 - <rustc_hir_typeck[726d463412e15d63]::fn_ctxt::FnCtxt>::demand_coerce
  32:     0x7ff831aa47dd - <rustc_hir_typeck[726d463412e15d63]::fn_ctxt::FnCtxt>::check_struct_path
  33:     0x7ff831a456b5 - <rustc_hir_typeck[726d463412e15d63]::fn_ctxt::FnCtxt>::demand_coerce
  34:     0x7ff831a6a271 - <rustc_hir_typeck[726d463412e15d63]::fn_ctxt::FnCtxt>::demand_coerce
  35:     0x7ff831b04e67 - <rustc_hir_typeck[726d463412e15d63]::writeback::WritebackCx as rustc_hir[a0ba7d6a2d0a2d5c]::intravisit::Visitor>::visit_ty
  36:     0x7ff831b202e7 - <rustc_hir_typeck[726d463412e15d63]::inherited::Inherited as core[ab957a7126758ba9]::ops::deref::Deref>::deref
  37:     0x7ff830cd6f15 - <rustc_query_impl[78e525705bed6840]::on_disk_cache::CacheEncoder as rustc_type_ir[197ea4a31556d302]::codec::TyEncoder>::encode_alloc_id
  38:     0x7ff8322ad263 - <rustc_middle[484603f84bd5edf8]::ty::Visibility as rustc_privacy[7356e04eccd2b68]::VisibilityLike>::new_min
  39:     0x7ff83237e743 - <rustc_query_impl[78e525705bed6840]::Queries as rustc_middle[484603f84bd5edf8]::ty::query::QueryEngine>::as_any
  40:     0x7ff831ed5ea8 - <rustc_mir_build[20a96c4a1e0f6c98]::thir::pattern::usefulness::PatStack>::head
  41:     0x7ff830ccd438 - <rustc_query_impl[78e525705bed6840]::on_disk_cache::CacheEncoder as rustc_type_ir[197ea4a31556d302]::codec::TyEncoder>::encode_alloc_id
  42:     0x7ff8322b7be4 - <rustc_middle[484603f84bd5edf8]::ty::Visibility as rustc_privacy[7356e04eccd2b68]::VisibilityLike>::new_min
  43:     0x7ff831e5afad - <rustc_middle[484603f84bd5edf8]::lint::ShallowLintLevelMap>::lint_level_id_at_node
  44:     0x7ff830ccdb79 - <rustc_query_impl[78e525705bed6840]::on_disk_cache::CacheEncoder as rustc_type_ir[197ea4a31556d302]::codec::TyEncoder>::encode_alloc_id
  45:     0x7ff8322b35a7 - <rustc_middle[484603f84bd5edf8]::ty::Visibility as rustc_privacy[7356e04eccd2b68]::VisibilityLike>::new_min
  46:     0x7ff832017005 - <rustc_mir_transform[447b65096884623e]::check_unsafety::UnsafetyChecker as rustc_middle[484603f84bd5edf8]::mir::visit::Visitor>::visit_place
  47:     0x7ff83200b2f8 - <rustc_mir_transform[447b65096884623e]::shim::DropShimElaborator as rustc_mir_dataflow[f943da5690917572]::elaborate_drops::DropElaborator>::drop_style
  48:     0x7ff830cd6f15 - <rustc_query_impl[78e525705bed6840]::on_disk_cache::CacheEncoder as rustc_type_ir[197ea4a31556d302]::codec::TyEncoder>::encode_alloc_id
  49:     0x7ff83227e62f - <rustc_middle[484603f84bd5edf8]::ty::Visibility as rustc_privacy[7356e04eccd2b68]::VisibilityLike>::new_min
  50:     0x7ff831feac67 - <rustc_mir_transform[447b65096884623e]::unreachable_prop::UnreachablePropagation as rustc_middle[484603f84bd5edf8]::mir::MirPass>::run_pass
  51:     0x7ff830ccdb79 - <rustc_query_impl[78e525705bed6840]::on_disk_cache::CacheEncoder as rustc_type_ir[197ea4a31556d302]::codec::TyEncoder>::encode_alloc_id
  52:     0x7ff8322b58be - <rustc_middle[484603f84bd5edf8]::ty::Visibility as rustc_privacy[7356e04eccd2b68]::VisibilityLike>::new_min
  53:     0x7ff831fed3f0 - <rustc_mir_transform[447b65096884623e]::unreachable_prop::UnreachablePropagation as rustc_middle[484603f84bd5edf8]::mir::MirPass>::run_pass
  54:     0x7ff830cce338 - <rustc_query_impl[78e525705bed6840]::on_disk_cache::CacheEncoder as rustc_type_ir[197ea4a31556d302]::codec::TyEncoder>::encode_alloc_id
  55:     0x7ff832237a74 - <rustc_middle[484603f84bd5edf8]::ty::Visibility as rustc_privacy[7356e04eccd2b68]::VisibilityLike>::new_min
  56:     0x7ff8315e2248 - <rustc_middle[484603f84bd5edf8]::ty::sty::Region as rustc_borrowck[c87751c803a78843]::nll::ToRegionVid>::to_region_vid
  57:     0x7ff8315e1be8 - <rustc_middle[484603f84bd5edf8]::ty::sty::Region as rustc_borrowck[c87751c803a78843]::nll::ToRegionVid>::to_region_vid
  58:     0x7ff830cd6f15 - <rustc_query_impl[78e525705bed6840]::on_disk_cache::CacheEncoder as rustc_type_ir[197ea4a31556d302]::codec::TyEncoder>::encode_alloc_id
  59:     0x7ff832233576 - <rustc_middle[484603f84bd5edf8]::ty::Visibility as rustc_privacy[7356e04eccd2b68]::VisibilityLike>::new_min
  60:     0x7ff83237e91f - <rustc_query_impl[78e525705bed6840]::Queries as rustc_middle[484603f84bd5edf8]::ty::query::QueryEngine>::as_any
  61:     0x7ff831945979 - <rustc_hir[a0ba7d6a2d0a2d5c]::lang_items::LanguageItems>::pointer_sized
  62:     0x7ff8323c589b - <rustc_query_impl[78e525705bed6840]::on_disk_cache::CacheEncoder as rustc_serialize[24aa371669c7d619]::serialize::Encoder>::emit_u32
  63:     0x7ff832315599 - <rustc_middle[484603f84bd5edf8]::ty::Visibility as rustc_privacy[7356e04eccd2b68]::VisibilityLike>::new_min
  64:     0x7ff8307b90b4 - <<dyn rustc_hir_analysis[eefa32d64dd8432c]::astconv::AstConv>::create_substs_for_ast_path::{closure#0}::SubstsForAstPathCtxt as rustc_hir_analysis[eefa32d64dd8432c]::astconv::CreateSubstsForGenericArgsCtxt>::inferred_kind
  65:     0x7ff83198720d - rustc_hir_analysis[eefa32d64dd8432c]::check::check::check_abi
  66:     0x7ff830cd8685 - <rustc_query_impl[78e525705bed6840]::on_disk_cache::CacheEncoder as rustc_type_ir[197ea4a31556d302]::codec::TyEncoder>::encode_alloc_id
  67:     0x7ff830b9ab4c - <core[ab957a7126758ba9]::option::Option<rustc_middle[484603f84bd5edf8]::middle::privacy::Level> as rustc_privacy[7356e04eccd2b68]::VisibilityLike>::new_min
  68:     0x7ff830c9bf1f - <rustc_query_impl[78e525705bed6840]::Queries as rustc_middle[484603f84bd5edf8]::ty::query::QueryEngine>::try_mark_green
  69:     0x7ff8307c2a20 - rustc_hir_analysis[eefa32d64dd8432c]::hir_wf_check::provide
  70:     0x7ff8307adc03 - rustc_hir_analysis[eefa32d64dd8432c]::check_crate
  71:     0x7ff8308d1c2d - rustc_interface[8244ed7f36050a97]::passes::analysis
  72:     0x7ff830cf7c69 - <rustc_query_impl[78e525705bed6840]::on_disk_cache::CacheEncoder as rustc_type_ir[197ea4a31556d302]::codec::TyEncoder>::encode_alloc_id
  73:     0x7ff830c245c6 - <core[ab957a7126758ba9]::option::Option<rustc_middle[484603f84bd5edf8]::middle::privacy::Level> as rustc_privacy[7356e04eccd2b68]::VisibilityLike>::new_min
  74:     0x7ff830c99a2f - <rustc_query_impl[78e525705bed6840]::Queries as rustc_middle[484603f84bd5edf8]::ty::query::QueryEngine>::try_mark_green
  75:     0x7ff8306cd4c0 - <rustc_data_structures[e9c5cab0f88c0c68]::temp_dir::MaybeTempDir>::new
  76:     0x7ff8306de6e6 - rustc_driver[6fce53b951639747]::args::arg_expand_all
  77:     0x7ff8306c29dc - <rustc_data_structures[e9c5cab0f88c0c68]::temp_dir::MaybeTempDir>::new
  78:     0x7ff8306cce0f - <rustc_data_structures[e9c5cab0f88c0c68]::temp_dir::MaybeTempDir>::new
  79:     0x7ff8306cc5f3 - <rustc_data_structures[e9c5cab0f88c0c68]::temp_dir::MaybeTempDir>::new
  80:     0x7ff8306c42dd - <rustc_data_structures[e9c5cab0f88c0c68]::temp_dir::MaybeTempDir>::new
  81:     0x7ff8664f021c - std::sys::windows::thread::Thread::new::he1a8155b1a8cc29c
  82:     0x7ff8a7a67614 - BaseThreadInitThunk
  83:     0x7ff8a8f226a1 - RtlUserThreadStart

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 (2c8cc3432 2023-03-06) running on x86_64-pc-windows-msvc

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

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

query stack during panic:
#0 [typeck] type-checking `serial_1::serial_2::<impl at src\serial_1\serial_2.rs:70:1: 70:35>::split_method`
#1 [thir_body] building THIR for `serial_1::serial_2::<impl at src\serial_1\serial_2.rs:70:1: 70:35>::split_method`
#2 [mir_built] building MIR for `serial_1::serial_2::<impl at src\serial_1\serial_2.rs:70:1: 70:35>::split_method`
#3 [unsafety_check_result] unsafety-checking `serial_1::serial_2::<impl at src\serial_1\serial_2.rs:70:1: 70:35>::split_method`
#4 [mir_const] preparing `serial_1::serial_2::<impl at src\serial_1\serial_2.rs:70:1: 70:35>::split_method` for borrow checking
#5 [mir_promoted] processing MIR for `serial_1::serial_2::<impl at src\serial_1\serial_2.rs:70:1: 70:35>::split_method`
#6 [mir_borrowck] borrow-checking `serial_1::serial_2::<impl at src\serial_1\serial_2.rs:70:1: 70:35>::split_method`
#7 [type_of] computing type of `serial_1::serial_2::<impl at src\serial_1\serial_2.rs:70:1: 70:35>::split_method::{opaque#0}`
#8 [check_mod_item_types] checking item types in module `serial_1::serial_2`
#9 [analysis] running analysis passes on this crate
end of query stack
Backtrace I did not see any additional output

I did not see any backtrace output 

Thanks for listening,
-Michael

@mschnell1 mschnell1 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 Apr 4, 2023
@mschnell1
Copy link
Author

mschnell1 commented Apr 4, 2023

No change after upgrading by rustup update to

$ rustc --version --verbose
rustc 1.68.2 (9eb3afe 2023-03-27)
binary: rustc
commit-hash: 9eb3afe
commit-date: 2023-03-27
host: x86_64-pc-windows-msvc
release: 1.68.2
LLVM version: 15.0.6

Error output

error: internal compiler error: compiler\rustc_infer\src\infer\region_constraints\mod.rs:568:17: cannot relate bound region: '_#0r <= ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed(DefId(0:351 ~ e24_epd[3467]::serial_1::serial_2::{impl#0}::split_method::{opaque#0}::'_#1), '_) })

thread 'rustc' panicked at 'Box<dyn Any>', /rustc/9eb3afe9ebe9c7d2b84b71002d44f4a0edac95e0\compiler\rustc_errors\src\lib.rs:987:33
stack backtrace:
   0:     0x7ff8520d9d02 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hbb6eec21cb8e3d1b
   1:     0x7ff85211570b - core::fmt::write::h3f34d6e08b5a11e8
   2:     0x7ff8520ccdfa - <std::io::IoSlice as core::fmt::Debug>::fmt::h1d8b4e60e4c9e548
   3:     0x7ff8520d9a4b - std::sys::common::alloc::realloc_fallback::h258dcd65da5985d2
   4:     0x7ff8520dd3f9 - std::panicking::default_hook::h90b70b966050cb60
   5:     0x7ff8520dd07b - std::panicking::default_hook::h90b70b966050cb60
   6:     0x7ff82e6a9425 - rustc_driver[fbeb20e0897b27eb]::describe_lints
   7:     0x7ff8520ddd5f - std::panicking::rust_panic_with_hook::h1d50ae3462f62f01
   8:     0x7ff83096a703 - <<rustc_infer[e1f2f17455595243]::infer::error_reporting::TypeErrCtxt>::construct_generic_bound_failure::SubOrigin as core[15ae0b8045847941]::fmt::Debug>::fmt
   9:     0x7ff830968c19 - <<rustc_infer[e1f2f17455595243]::infer::error_reporting::TypeErrCtxt>::construct_generic_bound_failure::SubOrigin as core[15ae0b8045847941]::fmt::Debug>::fmt
  10:     0x7ff830968bb9 - <<rustc_infer[e1f2f17455595243]::infer::error_reporting::TypeErrCtxt>::construct_generic_bound_failure::SubOrigin as core[15ae0b8045847941]::fmt::Debug>::fmt
  11:     0x7ff830968ba9 - <<rustc_infer[e1f2f17455595243]::infer::error_reporting::TypeErrCtxt>::construct_generic_bound_failure::SubOrigin as core[15ae0b8045847941]::fmt::Debug>::fmt
  12:     0x7ff830968220 - <<rustc_infer[e1f2f17455595243]::infer::error_reporting::TypeErrCtxt>::construct_generic_bound_failure::SubOrigin as core[15ae0b8045847941]::fmt::Debug>::fmt
  13:     0x7ff830968079 - <<rustc_infer[e1f2f17455595243]::infer::error_reporting::TypeErrCtxt>::construct_generic_bound_failure::SubOrigin as core[15ae0b8045847941]::fmt::Debug>::fmt
  14:     0x7ff8309704c9 - <rustc_infer[e1f2f17455595243]::infer::opaque_types::table::OpaqueTypeStorage as core[15ae0b8045847941]::fmt::Debug>::fmt
  15:     0x7ff83097052d - <rustc_infer[e1f2f17455595243]::infer::opaque_types::table::OpaqueTypeStorage as core[15ae0b8045847941]::fmt::Debug>::fmt
  16:     0x7ff83096f73a - <rustc_infer[e1f2f17455595243]::infer::opaque_types::table::OpaqueTypeStorage as core[15ae0b8045847941]::fmt::Debug>::fmt
  17:     0x7ff83096f678 - <rustc_infer[e1f2f17455595243]::infer::opaque_types::table::OpaqueTypeStorage as core[15ae0b8045847941]::fmt::Debug>::fmt
  18:     0x7ff83096f636 - <rustc_infer[e1f2f17455595243]::infer::opaque_types::table::OpaqueTypeStorage as core[15ae0b8045847941]::fmt::Debug>::fmt
  19:     0x7ff82e4d776a - <rustc_infer[e1f2f17455595243]::infer::combine::ConstInferUnifier as rustc_middle[1d4803ea9c08b419]::ty::relate::TypeRelation>::consts
  20:     0x7ff82e4e61c7 - <rustc_middle[1d4803ea9c08b419]::ty::sty::AliasTy as rustc_infer[e1f2f17455595243]::infer::at::ToTrace>::to_trace
  21:     0x7ff82e4a1909 - <rustc_infer[e1f2f17455595243]::infer::equate::Equate as rustc_middle[1d4803ea9c08b419]::ty::relate::TypeRelation>::tys
  22:     0x7ff82cc6d78a - <rustc_middle[1d4803ea9c08b419]::traits::specialization_graph::Children as rustc_trait_selection[5f0f54a03cd0c301]::traits::specialize::specialization_graph::ChildrenExt>::insert_blindly
  23:     0x7ff82cc5b10b - <rustc_trait_selection[5f0f54a03cd0c301]::traits::project::AssocTypeNormalizer as rustc_middle[1d4803ea9c08b419]::ty::fold::TypeFolder>::fold_const
  24:     0x7ff8308b9218 - <rustc_trait_selection[5f0f54a03cd0c301]::solve::search_graph::StackDepth as core[15ae0b8045847941]::fmt::Debug>::fmt
  25:     0x7ff830857a09 - <rustc_trait_selection[5f0f54a03cd0c301]::traits::error_reporting::method_chain::CollectAllMismatches as rustc_middle[1d4803ea9c08b419]::ty::relate::TypeRelation>::consts
  26:     0x7ff8308d16c3 - <rustc_infer[e1f2f17455595243]::infer::error_reporting::TypeErrCtxt as rustc_trait_selection[5f0f54a03cd0c301]::traits::error_reporting::suggestions::TypeErrCtxtExt>::report_closure_arg_mismatch
  27:     0x7ff8308e4bdb - <rustc_infer[e1f2f17455595243]::infer::error_reporting::TypeErrCtxt as rustc_trait_selection[5f0f54a03cd0c301]::traits::error_reporting::TypeErrCtxtExt>::report_selection_error     
  28:     0x7ff8308f1805 - <rustc_infer[e1f2f17455595243]::infer::error_reporting::TypeErrCtxt as rustc_trait_selection[5f0f54a03cd0c301]::traits::error_reporting::InferCtxtPrivExt>::report_fulfillment_error 
  29:     0x7ff8308e1569 - <rustc_infer[e1f2f17455595243]::infer::error_reporting::TypeErrCtxt as rustc_trait_selection[5f0f54a03cd0c301]::traits::error_reporting::TypeErrCtxtExt>::report_fulfillment_errors  
  30:     0x7ff82d7f646e - <rustc_hir_typeck[527c1058ba999897]::fn_ctxt::FnCtxt>::demand_coerce
  31:     0x7ff82d7f7537 - <rustc_hir_typeck[527c1058ba999897]::fn_ctxt::FnCtxt>::demand_coerce
  32:     0x7ff82d83a622 - <rustc_hir_typeck[527c1058ba999897]::fn_ctxt::FnCtxt>::check_struct_path
  33:     0x7ff82d7f7fbf - <rustc_hir_typeck[527c1058ba999897]::fn_ctxt::FnCtxt>::demand_coerce
  34:     0x7ff82d80d7c0 - <rustc_hir_typeck[527c1058ba999897]::fn_ctxt::FnCtxt>::demand_coerce
  35:     0x7ff82d8ac29d - <rustc_hir_typeck[527c1058ba999897]::writeback::WritebackCx as rustc_hir[38532e4666ac8dc2]::intravisit::Visitor>::visit_ty
  36:     0x7ff82d7befcc - <rustc_hir_typeck[527c1058ba999897]::inherited::Inherited as core[15ae0b8045847941]::ops::deref::Deref>::deref
  37:     0x7ff82c88e669 - <rustc_query_impl[22fc8f5fe5921e7d]::on_disk_cache::CacheEncoder as rustc_type_ir[76501457ae8f3cde]::codec::TyEncoder>::encode_alloc_id
  38:     0x7ff82c8f47c5 - <&[(rustc_middle[1d4803ea9c08b419]::ty::Predicate, rustc_span[31f727a51b7d57bd]::span_encoding::Span)] as rustc_serialize[637af69557f69e4e]::serialize::Decodable<rustc_query_impl[22fc8f5fe5921e7d]::on_disk_cache::CacheDecoder>>::decode
  39:     0x7ff82e0808ad - <&[(rustc_middle[1d4803ea9c08b419]::ty::Clause, rustc_span[31f727a51b7d57bd]::span_encoding::Span)] as rustc_serialize[637af69557f69e4e]::serialize::Decodable<rustc_query_impl[22fc8f5fe5921e7d]::on_disk_cache::CacheDecoder>>::decode
  40:     0x7ff82df57093 - <rustc_query_impl[22fc8f5fe5921e7d]::Queries as rustc_middle[1d4803ea9c08b419]::ty::query::QueryEngine>::as_any
  41:     0x7ff82e5ad3f5 - <rustc_middle[1d4803ea9c08b419]::ty::context::TyCtxt>::typeck_opt_const_arg
  42:     0x7ff82dc30cc9 - <rustc_passes[bd5f324aecd13b61]::liveness::Liveness as rustc_hir[38532e4666ac8dc2]::intravisit::Visitor>::visit_arm
  43:     0x7ff82c88ce23 - <rustc_query_impl[22fc8f5fe5921e7d]::on_disk_cache::CacheEncoder as rustc_type_ir[76501457ae8f3cde]::codec::TyEncoder>::encode_alloc_id
  44:     0x7ff82c8e987d - <&[(rustc_middle[1d4803ea9c08b419]::ty::Predicate, rustc_span[31f727a51b7d57bd]::span_encoding::Span)] as rustc_serialize[637af69557f69e4e]::serialize::Decodable<rustc_query_impl[22fc8f5fe5921e7d]::on_disk_cache::CacheDecoder>>::decode
  45:     0x7ff82e088fb0 - <&[(rustc_middle[1d4803ea9c08b419]::ty::Clause, rustc_span[31f727a51b7d57bd]::span_encoding::Span)] as rustc_serialize[637af69557f69e4e]::serialize::Decodable<rustc_query_impl[22fc8f5fe5921e7d]::on_disk_cache::CacheDecoder>>::decode
  46:     0x7ff82df535aa - <rustc_query_impl[22fc8f5fe5921e7d]::Queries as rustc_middle[1d4803ea9c08b419]::ty::query::QueryEngine>::as_any
  47:     0x7ff82dc6103e - <rustc_mir_build[edc916ca84483e0b]::thir::pattern::check_match::MatchVisitor as rustc_hir[38532e4666ac8dc2]::intravisit::Visitor>::visit_param
  48:     0x7ff82c88cf93 - <rustc_query_impl[22fc8f5fe5921e7d]::on_disk_cache::CacheEncoder as rustc_type_ir[76501457ae8f3cde]::codec::TyEncoder>::encode_alloc_id
  49:     0x7ff82c8e9ed0 - <&[(rustc_middle[1d4803ea9c08b419]::ty::Predicate, rustc_span[31f727a51b7d57bd]::span_encoding::Span)] as rustc_serialize[637af69557f69e4e]::serialize::Decodable<rustc_query_impl[22fc8f5fe5921e7d]::on_disk_cache::CacheDecoder>>::decode
  50:     0x7ff82e0856b2 - <&[(rustc_middle[1d4803ea9c08b419]::ty::Clause, rustc_span[31f727a51b7d57bd]::span_encoding::Span)] as rustc_serialize[637af69557f69e4e]::serialize::Decodable<rustc_query_impl[22fc8f5fe5921e7d]::on_disk_cache::CacheDecoder>>::decode
  51:     0x7ff82df537f8 - <rustc_query_impl[22fc8f5fe5921e7d]::Queries as rustc_middle[1d4803ea9c08b419]::ty::query::QueryEngine>::as_any
  52:     0x7ff82da1c9f3 - <rustc_mir_transform[146ad2592ddb67a2]::check_unsafety::UnsafetyChecker as rustc_middle[1d4803ea9c08b419]::mir::visit::Visitor>::visit_place
  53:     0x7ff82da10578 - <rustc_mir_transform[146ad2592ddb67a2]::deduce_param_attrs::DeduceReadOnly as rustc_middle[1d4803ea9c08b419]::mir::visit::Visitor>::visit_terminator
  54:     0x7ff82c88e669 - <rustc_query_impl[22fc8f5fe5921e7d]::on_disk_cache::CacheEncoder as rustc_type_ir[76501457ae8f3cde]::codec::TyEncoder>::encode_alloc_id
  55:     0x7ff82c8f47c5 - <&[(rustc_middle[1d4803ea9c08b419]::ty::Predicate, rustc_span[31f727a51b7d57bd]::span_encoding::Span)] as rustc_serialize[637af69557f69e4e]::serialize::Decodable<rustc_query_impl[22fc8f5fe5921e7d]::on_disk_cache::CacheDecoder>>::decode
  56:     0x7ff82e05bafd - <&[(rustc_middle[1d4803ea9c08b419]::ty::Clause, rustc_span[31f727a51b7d57bd]::span_encoding::Span)] as rustc_serialize[637af69557f69e4e]::serialize::Decodable<rustc_query_impl[22fc8f5fe5921e7d]::on_disk_cache::CacheDecoder>>::decode
  57:     0x7ff82df56ae3 - <rustc_query_impl[22fc8f5fe5921e7d]::Queries as rustc_middle[1d4803ea9c08b419]::ty::query::QueryEngine>::as_any
  58:     0x7ff82d9e110a - <rustc_mir_transform[146ad2592ddb67a2]::unreachable_prop::UnreachablePropagation as rustc_middle[1d4803ea9c08b419]::mir::MirPass>::run_pass
  59:     0x7ff82c88cf93 - <rustc_query_impl[22fc8f5fe5921e7d]::on_disk_cache::CacheEncoder as rustc_type_ir[76501457ae8f3cde]::codec::TyEncoder>::encode_alloc_id
  60:     0x7ff82c8e9ed0 - <&[(rustc_middle[1d4803ea9c08b419]::ty::Predicate, rustc_span[31f727a51b7d57bd]::span_encoding::Span)] as rustc_serialize[637af69557f69e4e]::serialize::Decodable<rustc_query_impl[22fc8f5fe5921e7d]::on_disk_cache::CacheDecoder>>::decode
  61:     0x7ff82e08733f - <&[(rustc_middle[1d4803ea9c08b419]::ty::Clause, rustc_span[31f727a51b7d57bd]::span_encoding::Span)] as rustc_serialize[637af69557f69e4e]::serialize::Decodable<rustc_query_impl[22fc8f5fe5921e7d]::on_disk_cache::CacheDecoder>>::decode
  62:     0x7ff82df53908 - <rustc_query_impl[22fc8f5fe5921e7d]::Queries as rustc_middle[1d4803ea9c08b419]::ty::query::QueryEngine>::as_any
  63:     0x7ff82d9e385a - <rustc_mir_transform[146ad2592ddb67a2]::unreachable_prop::UnreachablePropagation as rustc_middle[1d4803ea9c08b419]::mir::MirPass>::run_pass
  64:     0x7ff82c88d103 - <rustc_query_impl[22fc8f5fe5921e7d]::on_disk_cache::CacheEncoder as rustc_type_ir[76501457ae8f3cde]::codec::TyEncoder>::encode_alloc_id
  65:     0x7ff82c8ea57d - <&[(rustc_middle[1d4803ea9c08b419]::ty::Predicate, rustc_span[31f727a51b7d57bd]::span_encoding::Span)] as rustc_serialize[637af69557f69e4e]::serialize::Decodable<rustc_query_impl[22fc8f5fe5921e7d]::on_disk_cache::CacheDecoder>>::decode
  66:     0x7ff82e0267b4 - <&[(rustc_middle[1d4803ea9c08b419]::ty::Clause, rustc_span[31f727a51b7d57bd]::span_encoding::Span)] as rustc_serialize[637af69557f69e4e]::serialize::Decodable<rustc_query_impl[22fc8f5fe5921e7d]::on_disk_cache::CacheDecoder>>::decode
  67:     0x7ff82df53d7a - <rustc_query_impl[22fc8f5fe5921e7d]::Queries as rustc_middle[1d4803ea9c08b419]::ty::query::QueryEngine>::as_any
  68:     0x7ff82dcaf0c3 - <rustc_mir_build[edc916ca84483e0b]::thir::pattern::check_match::MatchVisitor as rustc_hir[38532e4666ac8dc2]::intravisit::Visitor>::visit_param
  69:     0x7ff82dcaead8 - <rustc_mir_build[edc916ca84483e0b]::thir::pattern::check_match::MatchVisitor as rustc_hir[38532e4666ac8dc2]::intravisit::Visitor>::visit_param
  70:     0x7ff82c88e669 - <rustc_query_impl[22fc8f5fe5921e7d]::on_disk_cache::CacheEncoder as rustc_type_ir[76501457ae8f3cde]::codec::TyEncoder>::encode_alloc_id
  71:     0x7ff82c8f47c5 - <&[(rustc_middle[1d4803ea9c08b419]::ty::Predicate, rustc_span[31f727a51b7d57bd]::span_encoding::Span)] as rustc_serialize[637af69557f69e4e]::serialize::Decodable<rustc_query_impl[22fc8f5fe5921e7d]::on_disk_cache::CacheDecoder>>::decode
  72:     0x7ff82e023435 - <&[(rustc_middle[1d4803ea9c08b419]::ty::Clause, rustc_span[31f727a51b7d57bd]::span_encoding::Span)] as rustc_serialize[637af69557f69e4e]::serialize::Decodable<rustc_query_impl[22fc8f5fe5921e7d]::on_disk_cache::CacheDecoder>>::decode
  73:     0x7ff82df5726f - <rustc_query_impl[22fc8f5fe5921e7d]::Queries as rustc_middle[1d4803ea9c08b419]::ty::query::QueryEngine>::as_any
  74:     0x7ff82d99a720 - <rustc_hir_analysis[9d3badbe7d08bcd8]::collect::lifetimes::LifetimeContext as rustc_hir[38532e4666ac8dc2]::intravisit::Visitor>::visit_lifetime
  75:     0x7ff82e000297 - <&[(rustc_middle[1d4803ea9c08b419]::ty::Clause, rustc_span[31f727a51b7d57bd]::span_encoding::Span)] as rustc_serialize[637af69557f69e4e]::serialize::Decodable<rustc_query_impl[22fc8f5fe5921e7d]::on_disk_cache::CacheDecoder>>::decode
  76:     0x7ff82e0c6f10 - <&[(rustc_middle[1d4803ea9c08b419]::ty::Clause, rustc_span[31f727a51b7d57bd]::span_encoding::Span)] as rustc_serialize[637af69557f69e4e]::serialize::Decodable<rustc_query_impl[22fc8f5fe5921e7d]::on_disk_cache::CacheDecoder>>::decode
  77:     0x7ff82c5bcff8 - rustc_hir_analysis[9d3badbe7d08bcd8]::hir_wf_check::provide
  78:     0x7ff82d94a2ea - rustc_hir_analysis[9d3badbe7d08bcd8]::check::check::check_abi
  79:     0x7ff82c88d3d9 - <rustc_query_impl[22fc8f5fe5921e7d]::on_disk_cache::CacheEncoder as rustc_type_ir[76501457ae8f3cde]::codec::TyEncoder>::encode_alloc_id
  80:     0x7ff82c8f69d5 - <&[(rustc_middle[1d4803ea9c08b419]::ty::Predicate, rustc_span[31f727a51b7d57bd]::span_encoding::Span)] as rustc_serialize[637af69557f69e4e]::serialize::Decodable<rustc_query_impl[22fc8f5fe5921e7d]::on_disk_cache::CacheDecoder>>::decode
  81:     0x7ff82c9915a1 - <&[(rustc_middle[1d4803ea9c08b419]::ty::Predicate, rustc_span[31f727a51b7d57bd]::span_encoding::Span)] as rustc_serialize[637af69557f69e4e]::serialize::Decodable<rustc_query_impl[22fc8f5fe5921e7d]::on_disk_cache::CacheDecoder>>::decode
  82:     0x7ff82c862b0f - <rustc_query_impl[22fc8f5fe5921e7d]::Queries as rustc_middle[1d4803ea9c08b419]::ty::query::QueryEngine>::try_mark_green
  83:     0x7ff82c599e30 - <<dyn rustc_hir_analysis[9d3badbe7d08bcd8]::astconv::AstConv>::create_substs_for_ast_path::{closure#0}::SubstsForAstPathCtxt as rustc_hir_analysis[9d3badbe7d08bcd8]::astconv::CreateSubstsForGenericArgsCtxt>::inferred_kind
  84:     0x7ff82c591e89 - rustc_hir_analysis[9d3badbe7d08bcd8]::check_crate
  85:     0x7ff82be72295 - rustc_interface[5b253cef4d5aad89]::passes::analysis
  86:     0x7ff82c88ff1f - <rustc_query_impl[22fc8f5fe5921e7d]::on_disk_cache::CacheEncoder as rustc_type_ir[76501457ae8f3cde]::codec::TyEncoder>::encode_alloc_id
  87:     0x7ff82c90ed19 - <&[(rustc_middle[1d4803ea9c08b419]::ty::Predicate, rustc_span[31f727a51b7d57bd]::span_encoding::Span)] as rustc_serialize[637af69557f69e4e]::serialize::Decodable<rustc_query_impl[22fc8f5fe5921e7d]::on_disk_cache::CacheDecoder>>::decode
  88:     0x7ff82c9fb611 - <&[(rustc_middle[1d4803ea9c08b419]::ty::Predicate, rustc_span[31f727a51b7d57bd]::span_encoding::Span)] as rustc_serialize[637af69557f69e4e]::serialize::Decodable<rustc_query_impl[22fc8f5fe5921e7d]::on_disk_cache::CacheDecoder>>::decode
  89:     0x7ff82c86094f - <rustc_query_impl[22fc8f5fe5921e7d]::Queries as rustc_middle[1d4803ea9c08b419]::ty::query::QueryEngine>::try_mark_green
  90:     0x7ff82be1d1a9 - <rustc_middle[1d4803ea9c08b419]::ty::SymbolName as core[15ae0b8045847941]::fmt::Debug>::fmt
  91:     0x7ff82be2e7fa - rustc_driver[fbeb20e0897b27eb]::args::arg_expand_all
  92:     0x7ff82be12ac1 - <unknown>
  93:     0x7ff82be1cacb - <rustc_middle[1d4803ea9c08b419]::ty::SymbolName as core[15ae0b8045847941]::fmt::Debug>::fmt
  94:     0x7ff82be1c319 - <rustc_middle[1d4803ea9c08b419]::ty::SymbolName as core[15ae0b8045847941]::fmt::Debug>::fmt
  95:     0x7ff82be1404d - <rustc_middle[1d4803ea9c08b419]::ty::SymbolName as core[15ae0b8045847941]::fmt::Debug>::fmt
  96:     0x7ff8520f021c - std::sys::windows::thread::Thread::new::hf7aab9c244c58572
  97:     0x7ff8a7a67614 - BaseThreadInitThunk
  98:     0x7ff8a8f226a1 - RtlUserThreadStart

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.2 (9eb3afe9e 2023-03-27) running on x86_64-pc-windows-msvc

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

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

query stack during panic:
#0 [typeck] type-checking `serial_1::serial_2::<impl at src\serial_1\serial_2.rs:70:1: 70:35>::split_method`
#1 [thir_body] building THIR for `serial_1::serial_2::<impl at src\serial_1\serial_2.rs:70:1: 70:35>::split_method`
#2 [mir_built] building MIR for `serial_1::serial_2::<impl at src\serial_1\serial_2.rs:70:1: 70:35>::split_method`
#3 [unsafety_check_result] unsafety-checking `serial_1::serial_2::<impl at src\serial_1\serial_2.rs:70:1: 70:35>::split_method`
#4 [mir_const] preparing `serial_1::serial_2::<impl at src\serial_1\serial_2.rs:70:1: 70:35>::split_method` for borrow checking
#5 [mir_promoted] processing MIR for `serial_1::serial_2::<impl at src\serial_1\serial_2.rs:70:1: 70:35>::split_method`
#6 [mir_borrowck] borrow-checking `serial_1::serial_2::<impl at src\serial_1\serial_2.rs:70:1: 70:35>::split_method`
#7 [type_of] computing type of `serial_1::serial_2::<impl at src\serial_1\serial_2.rs:70:1: 70:35>::split_method::{opaque#0}`
#8 [check_mod_item_types] checking item types in module `serial_1::serial_2`
#9 [analysis] running analysis passes on this crate
end of query stack

-Michael

@lqd
Copy link
Member

lqd commented Apr 4, 2023

Can you check on beta btw ? It should be fixed there.

@mschnell1
Copy link
Author

mschnell1 commented Apr 4, 2023

how to install that version ? (I am rather new here...)

@lqd
Copy link
Member

lqd commented Apr 4, 2023

rustup install beta should work, and then you can run your previous cargo/rustc commands that caused the error above, but with +beta to make sure that version is used, like cargo +beta check. It should show a compilation error rather than this "cannot relate bound region" ICE.

@mschnell1
Copy link
Author

mschnell1 commented Apr 4, 2023

Hmmm
cargo +beta check
does not work (no such command beta

@lqd
Copy link
Member

lqd commented Apr 4, 2023

do you have a link to your repository ?

@mschnell1
Copy link
Author

mschnell1 commented Apr 4, 2023

No. It's local right now. And the source code will be in the comnpabnies own GitLab server. The company right now is not inclined to contribute to the open source community (the dev department is working on that ....)

Moreove my current code is mostly nonsense, anyways.

I in fact would like to be able to run the beta compiler though. (This is on Windows in the VSCode terminal. Ist that a problem ? I do have a Linux VM and I also could install the Windows Linux Subsystem.)

@lqd
Copy link
Member

lqd commented Apr 4, 2023

rustc +beta -vV and cargo +beta -vV should work wherever rustup is in the $path.

In any case, I'm sure this issue is solved on beta, and will become fixed on stable in 1.69 releasing in a couple weeks.

@mschnell1
Copy link
Author

mschnell1 commented Apr 4, 2023

rustc +beta -vV
does work

rustup 1.25.2 (17db695f1 2023-02-01)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.69.0-beta.6 (6a97551bc 2023-04-02)`

cargo +beta -vV
does not work

$ cargo  +beta -vV
error: no such command: `+beta`
        Cargo does not handle `+toolchain` directives.
        Did you mean to invoke `cargo` through `rustup` instead?
$ rustup +beta check
stable-x86_64-pc-windows-msvc - Up to date : 1.68.2 (9eb3afe9e 2023-03-27)
beta-x86_64-pc-windows-msvc - Up to date : 1.69.0-beta.6 (6a97551bc 2023-04-02)
rustup - Up to date : 1.25.2

@jyn514
Copy link
Member

jyn514 commented Apr 4, 2023

Duplicate of #109361

@jyn514 jyn514 marked this as a duplicate of #109361 Apr 4, 2023
@jyn514 jyn514 closed this as not planned Won't fix, can't repro, duplicate, stale Apr 4, 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

No branches or pull requests

3 participants