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: compiler/rustc_borrowck/src/universal_regions.rs:882:36: cannot convert RePlaceholder(Placeholder { bound: BoundRegion { kind: BrNamed}) to a region vid #112250

Closed
smessmer opened this issue Jun 3, 2023 · 1 comment · Fixed by #112422
Assignees
Labels
A-borrow-checker Area: The borrow checker C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ S-has-mcve Status: A Minimal Complete and Verifiable Example has been found for this issue T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@smessmer
Copy link

smessmer commented Jun 3, 2023

Code

cryfs/cryfs@ae730ec

In that commit, go to folder src/blockstore/rust/cryfs-cli and run cargo check

Meta

(tested in nightly, stable 1.69 and stable 1.70)

rustc --version --verbose:

rustc 1.70.0 (90c541806 2023-05-31)
binary: rustc
commit-hash: 90c541806f23a127002de5b4038be731ba1458ca
commit-date: 2023-05-31
host: x86_64-unknown-linux-gnu
release: 1.70.0
LLVM version: 16.0.2

Error output

error: internal compiler error: compiler/rustc_borrowck/src/universal_regions.rs:882:36: cannot convert `RePlaceholder(Placeholder { universe: U1, bound: BoundRegion { var: 0, kind: BrNamed(DefId(168:840 ~ cryfs_cryfs[97fd]::filesystem::device::CryDevice::'a), 'a) } })` to a region vid
Backtrace

error: internal compiler error: compiler/rustc_borrowck/src/universal_regions.rs:882:36: cannot convert `RePlaceholder(Placeholder { universe: U1, bound: BoundRegion { var: 0, kind: BrNamed(DefId(168:840 ~ cryfs_cryfs[97fd]::filesystem::device::CryDevice::'a), 'a) } })` to a region vid

thread 'rustc' panicked at 'Box<dyn Any>', /rustc/90c541806f23a127002de5b4038be731ba1458ca/compiler/rustc_errors/src/lib.rs:1643:9
stack backtrace:
   0:     0x7f4d76578cca - std::backtrace_rs::backtrace::libunwind::trace::h9a6b80bbf328ba5d
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f4d76578cca - std::backtrace_rs::backtrace::trace_unsynchronized::hd162ec543a11886b
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f4d76578cca - std::sys_common::backtrace::_print_fmt::h78a5099be12f51a6
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7f4d76578cca - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::ha1c5390454d74f71
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f4d765dd0cf - core::fmt::write::h9ffde816c577717b
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/fmt/mod.rs:1254:17
   5:     0x7f4d7656b805 - std::io::Write::write_fmt::h88186074961638e4
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/io/mod.rs:1698:15
   6:     0x7f4d76578a95 - std::sys_common::backtrace::_print::h184198273ed08d59
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x7f4d76578a95 - std::sys_common::backtrace::print::h1b4d8e7add699453
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x7f4d7657b73e - std::panicking::default_hook::{{closure}}::h393bcea75423915a
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:269:22
   9:     0x7f4d7657b4e5 - std::panicking::default_hook::h48c64f31d8b3fd03
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:288:9
  10:     0x7f4d79837995 - <rustc_driver_impl[fe6df70259db788d]::DEFAULT_HOOK::{closure#0}::{closure#0} as core[da82827a87f140f9]::ops::function::FnOnce<(&core[da82827a87f140f9]::panic::panic_info::PanicInfo,)>>::call_once::{shim:vtable#0}
  11:     0x7f4d7657bf34 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::hb9b860f5a1175bda
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/alloc/src/boxed.rs:1987:9
  12:     0x7f4d7657bf34 - std::panicking::rust_panic_with_hook::hafdc493a79370062
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:695:13
  13:     0x7f4d79d51c31 - std[b70fedfd8b77e9]::panicking::begin_panic::<rustc_errors[c06e44e71f249a31]::ExplicitBug>::{closure#0}
  14:     0x7f4d79d515e6 - std[b70fedfd8b77e9]::sys_common::backtrace::__rust_end_short_backtrace::<std[b70fedfd8b77e9]::panicking::begin_panic<rustc_errors[c06e44e71f249a31]::ExplicitBug>::{closure#0}, !>
  15:     0x7f4d79d86b86 - std[b70fedfd8b77e9]::panicking::begin_panic::<rustc_errors[c06e44e71f249a31]::ExplicitBug>
  16:     0x7f4d79de4a76 - <rustc_errors[c06e44e71f249a31]::HandlerInner>::bug::<&alloc[c91da12302dbbf86]::string::String>
  17:     0x7f4d79de4740 - <rustc_errors[c06e44e71f249a31]::Handler>::bug::<&alloc[c91da12302dbbf86]::string::String>
  18:     0x7f4d79d9c6d4 - rustc_middle[a487dff4633a86d0]::util::bug::opt_span_bug_fmt::<rustc_span[2f805118d893a80f]::span_encoding::Span>::{closure#0}
  19:     0x7f4d79d9b18a - rustc_middle[a487dff4633a86d0]::ty::context::tls::with_opt::<rustc_middle[a487dff4633a86d0]::util::bug::opt_span_bug_fmt<rustc_span[2f805118d893a80f]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  20:     0x7f4d79d9b156 - rustc_middle[a487dff4633a86d0]::ty::context::tls::with_context_opt::<rustc_middle[a487dff4633a86d0]::ty::context::tls::with_opt<rustc_middle[a487dff4633a86d0]::util::bug::opt_span_bug_fmt<rustc_span[2f805118d893a80f]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  21:     0x7f4d79d9c626 - rustc_middle[a487dff4633a86d0]::util::bug::opt_span_bug_fmt::<rustc_span[2f805118d893a80f]::span_encoding::Span>
  22:     0x7f4d77b9c8b3 - rustc_middle[a487dff4633a86d0]::util::bug::bug_fmt
  23:     0x7f4d78724284 - rustc_borrowck[c07eeb7c7aba6c08]::type_check::free_region_relations::create
  24:     0x7f4d786fe78c - rustc_borrowck[c07eeb7c7aba6c08]::nll::compute_regions
  25:     0x7f4d786c9b46 - rustc_borrowck[c07eeb7c7aba6c08]::do_mir_borrowck
  26:     0x7f4d786c68a7 - rustc_borrowck[c07eeb7c7aba6c08]::mir_borrowck
  27:     0x7f4d786c5f6e - <rustc_borrowck[c07eeb7c7aba6c08]::provide::{closure#0} as core[da82827a87f140f9]::ops::function::FnOnce<(rustc_middle[a487dff4633a86d0]::ty::context::TyCtxt, rustc_span[2f805118d893a80f]::def_id::LocalDefId)>>::call_once
  28:     0x7f4d782c031e - <std[b70fedfd8b77e9]::thread::local::LocalKey<core[da82827a87f140f9]::cell::Cell<*const ()>>>::with::<rustc_middle[a487dff4633a86d0]::ty::context::tls::enter_context<rustc_query_system[5e34f8384464b8a5]::query::plumbing::execute_job_incr<rustc_query_impl[3e42b93bfeb445bd]::queries::mir_borrowck, rustc_query_impl[3e42b93bfeb445bd]::plumbing::QueryCtxt>::{closure#2}, (rustc_middle[a487dff4633a86d0]::query::erase::Erased<[u8; 8usize]>, rustc_query_system[5e34f8384464b8a5]::dep_graph::graph::DepNodeIndex)>::{closure#0}, (rustc_middle[a487dff4633a86d0]::query::erase::Erased<[u8; 8usize]>, rustc_query_system[5e34f8384464b8a5]::dep_graph::graph::DepNodeIndex)>
  29:     0x7f4d782bf27b - rustc_query_system[5e34f8384464b8a5]::query::plumbing::try_execute_query::<rustc_query_impl[3e42b93bfeb445bd]::queries::mir_borrowck, rustc_query_impl[3e42b93bfeb445bd]::plumbing::QueryCtxt>
  30:     0x7f4d782bea53 - <rustc_query_impl[3e42b93bfeb445bd]::Queries as rustc_middle[a487dff4633a86d0]::ty::query::QueryEngine>::mir_borrowck
  31:     0x7f4d787ba559 - <rustc_borrowck[c07eeb7c7aba6c08]::type_check::TypeChecker>::prove_closure_bounds
  32:     0x7f4d78797c82 - <rustc_borrowck[c07eeb7c7aba6c08]::type_check::TypeChecker>::typeck_mir
  33:     0x7f4d786fec50 - rustc_borrowck[c07eeb7c7aba6c08]::nll::compute_regions
  34:     0x7f4d786c9b46 - rustc_borrowck[c07eeb7c7aba6c08]::do_mir_borrowck
  35:     0x7f4d786c68a7 - rustc_borrowck[c07eeb7c7aba6c08]::mir_borrowck
  36:     0x7f4d786c5f6e - <rustc_borrowck[c07eeb7c7aba6c08]::provide::{closure#0} as core[da82827a87f140f9]::ops::function::FnOnce<(rustc_middle[a487dff4633a86d0]::ty::context::TyCtxt, rustc_span[2f805118d893a80f]::def_id::LocalDefId)>>::call_once
  37:     0x7f4d782c031e - <std[b70fedfd8b77e9]::thread::local::LocalKey<core[da82827a87f140f9]::cell::Cell<*const ()>>>::with::<rustc_middle[a487dff4633a86d0]::ty::context::tls::enter_context<rustc_query_system[5e34f8384464b8a5]::query::plumbing::execute_job_incr<rustc_query_impl[3e42b93bfeb445bd]::queries::mir_borrowck, rustc_query_impl[3e42b93bfeb445bd]::plumbing::QueryCtxt>::{closure#2}, (rustc_middle[a487dff4633a86d0]::query::erase::Erased<[u8; 8usize]>, rustc_query_system[5e34f8384464b8a5]::dep_graph::graph::DepNodeIndex)>::{closure#0}, (rustc_middle[a487dff4633a86d0]::query::erase::Erased<[u8; 8usize]>, rustc_query_system[5e34f8384464b8a5]::dep_graph::graph::DepNodeIndex)>
  38:     0x7f4d782bf27b - rustc_query_system[5e34f8384464b8a5]::query::plumbing::try_execute_query::<rustc_query_impl[3e42b93bfeb445bd]::queries::mir_borrowck, rustc_query_impl[3e42b93bfeb445bd]::plumbing::QueryCtxt>
  39:     0x7f4d782bea53 - <rustc_query_impl[3e42b93bfeb445bd]::Queries as rustc_middle[a487dff4633a86d0]::ty::query::QueryEngine>::mir_borrowck
  40:     0x7f4d787ba559 - <rustc_borrowck[c07eeb7c7aba6c08]::type_check::TypeChecker>::prove_closure_bounds
  41:     0x7f4d78797c82 - <rustc_borrowck[c07eeb7c7aba6c08]::type_check::TypeChecker>::typeck_mir
  42:     0x7f4d786fec50 - rustc_borrowck[c07eeb7c7aba6c08]::nll::compute_regions
  43:     0x7f4d786c9b46 - rustc_borrowck[c07eeb7c7aba6c08]::do_mir_borrowck
  44:     0x7f4d786c68a7 - rustc_borrowck[c07eeb7c7aba6c08]::mir_borrowck
  45:     0x7f4d786c5f6e - <rustc_borrowck[c07eeb7c7aba6c08]::provide::{closure#0} as core[da82827a87f140f9]::ops::function::FnOnce<(rustc_middle[a487dff4633a86d0]::ty::context::TyCtxt, rustc_span[2f805118d893a80f]::def_id::LocalDefId)>>::call_once
  46:     0x7f4d782c031e - <std[b70fedfd8b77e9]::thread::local::LocalKey<core[da82827a87f140f9]::cell::Cell<*const ()>>>::with::<rustc_middle[a487dff4633a86d0]::ty::context::tls::enter_context<rustc_query_system[5e34f8384464b8a5]::query::plumbing::execute_job_incr<rustc_query_impl[3e42b93bfeb445bd]::queries::mir_borrowck, rustc_query_impl[3e42b93bfeb445bd]::plumbing::QueryCtxt>::{closure#2}, (rustc_middle[a487dff4633a86d0]::query::erase::Erased<[u8; 8usize]>, rustc_query_system[5e34f8384464b8a5]::dep_graph::graph::DepNodeIndex)>::{closure#0}, (rustc_middle[a487dff4633a86d0]::query::erase::Erased<[u8; 8usize]>, rustc_query_system[5e34f8384464b8a5]::dep_graph::graph::DepNodeIndex)>
  47:     0x7f4d782bf27b - rustc_query_system[5e34f8384464b8a5]::query::plumbing::try_execute_query::<rustc_query_impl[3e42b93bfeb445bd]::queries::mir_borrowck, rustc_query_impl[3e42b93bfeb445bd]::plumbing::QueryCtxt>
  48:     0x7f4d782bea53 - <rustc_query_impl[3e42b93bfeb445bd]::Queries as rustc_middle[a487dff4633a86d0]::ty::query::QueryEngine>::mir_borrowck
  49:     0x7f4d78ad1569 - rustc_hir_analysis[44791ba5f8e3b26d]::collect::type_of::type_of
  50:     0x7f4d7800402d - <std[b70fedfd8b77e9]::thread::local::LocalKey<core[da82827a87f140f9]::cell::Cell<*const ()>>>::with::<rustc_middle[a487dff4633a86d0]::ty::context::tls::enter_context<rustc_query_system[5e34f8384464b8a5]::query::plumbing::execute_job_incr<rustc_query_impl[3e42b93bfeb445bd]::queries::type_of, rustc_query_impl[3e42b93bfeb445bd]::plumbing::QueryCtxt>::{closure#2}, (rustc_middle[a487dff4633a86d0]::query::erase::Erased<[u8; 8usize]>, rustc_query_system[5e34f8384464b8a5]::dep_graph::graph::DepNodeIndex)>::{closure#0}, (rustc_middle[a487dff4633a86d0]::query::erase::Erased<[u8; 8usize]>, rustc_query_system[5e34f8384464b8a5]::dep_graph::graph::DepNodeIndex)>
  51:     0x7f4d78001bab - rustc_query_system[5e34f8384464b8a5]::query::plumbing::try_execute_query::<rustc_query_impl[3e42b93bfeb445bd]::queries::type_of, rustc_query_impl[3e42b93bfeb445bd]::plumbing::QueryCtxt>
  52:     0x7f4d780009aa - <rustc_query_impl[3e42b93bfeb445bd]::Queries as rustc_middle[a487dff4633a86d0]::ty::query::QueryEngine>::type_of
  53:     0x7f4d78a83648 - <rustc_middle[a487dff4633a86d0]::ty::util::OpaqueTypeExpander>::expand_opaque_ty
  54:     0x7f4d781a3131 - <rustc_middle[a487dff4633a86d0]::ty::util::OpaqueTypeExpander as rustc_type_ir[5a97038ec29b7d58]::fold::TypeFolder<rustc_middle[a487dff4633a86d0]::ty::context::TyCtxt>>::fold_ty
  55:     0x7f4d79d957c9 - rustc_middle[a487dff4633a86d0]::ty::util::fold_list::<rustc_middle[a487dff4633a86d0]::ty::util::OpaqueTypeExpander, rustc_middle[a487dff4633a86d0]::ty::Ty, <&rustc_middle[a487dff4633a86d0]::ty::list::List<rustc_middle[a487dff4633a86d0]::ty::Ty> as rustc_type_ir[5a97038ec29b7d58]::fold::TypeFoldable<rustc_middle[a487dff4633a86d0]::ty::context::TyCtxt>>::try_fold_with<rustc_middle[a487dff4633a86d0]::ty::util::OpaqueTypeExpander>::{closure#0}>
  56:     0x7f4d79d88292 - <rustc_middle[a487dff4633a86d0]::ty::util::OpaqueTypeExpander as rustc_type_ir[5a97038ec29b7d58]::fold::FallibleTypeFolder<rustc_middle[a487dff4633a86d0]::ty::context::TyCtxt>>::try_fold_binder::<&rustc_middle[a487dff4633a86d0]::ty::list::List<rustc_middle[a487dff4633a86d0]::ty::Ty>>
  57:     0x7f4d781a3c28 - <rustc_middle[a487dff4633a86d0]::ty::Ty as rustc_type_ir[5a97038ec29b7d58]::fold::TypeSuperFoldable<rustc_middle[a487dff4633a86d0]::ty::context::TyCtxt>>::super_fold_with::<rustc_middle[a487dff4633a86d0]::ty::util::OpaqueTypeExpander>
  58:     0x7f4d781a311a - <rustc_middle[a487dff4633a86d0]::ty::util::OpaqueTypeExpander as rustc_type_ir[5a97038ec29b7d58]::fold::TypeFolder<rustc_middle[a487dff4633a86d0]::ty::context::TyCtxt>>::fold_ty
  59:     0x7f4d781a33fb - rustc_middle[a487dff4633a86d0]::ty::util::fold_list::<rustc_middle[a487dff4633a86d0]::ty::util::OpaqueTypeExpander, rustc_middle[a487dff4633a86d0]::ty::subst::GenericArg, <&rustc_middle[a487dff4633a86d0]::ty::list::List<rustc_middle[a487dff4633a86d0]::ty::subst::GenericArg> as rustc_type_ir[5a97038ec29b7d58]::fold::TypeFoldable<rustc_middle[a487dff4633a86d0]::ty::context::TyCtxt>>::try_fold_with<rustc_middle[a487dff4633a86d0]::ty::util::OpaqueTypeExpander>::{closure#0}>
  60:     0x7f4d781a3bfc - <rustc_middle[a487dff4633a86d0]::ty::Ty as rustc_type_ir[5a97038ec29b7d58]::fold::TypeSuperFoldable<rustc_middle[a487dff4633a86d0]::ty::context::TyCtxt>>::super_fold_with::<rustc_middle[a487dff4633a86d0]::ty::util::OpaqueTypeExpander>
  61:     0x7f4d781a311a - <rustc_middle[a487dff4633a86d0]::ty::util::OpaqueTypeExpander as rustc_type_ir[5a97038ec29b7d58]::fold::TypeFolder<rustc_middle[a487dff4633a86d0]::ty::context::TyCtxt>>::fold_ty
  62:     0x7f4d78a834f3 - <rustc_middle[a487dff4633a86d0]::ty::util::OpaqueTypeExpander>::expand_opaque_ty
  63:     0x7f4d78a80fc7 - <rustc_middle[a487dff4633a86d0]::ty::context::TyCtxt>::try_expand_impl_trait_type
  64:     0x7f4d78a62727 - rustc_hir_analysis[44791ba5f8e3b26d]::check::check::check_mod_item_types
  65:     0x7f4d78e5e6eb - <std[b70fedfd8b77e9]::thread::local::LocalKey<core[da82827a87f140f9]::cell::Cell<*const ()>>>::with::<rustc_middle[a487dff4633a86d0]::ty::context::tls::enter_context<rustc_query_system[5e34f8384464b8a5]::query::plumbing::execute_job_incr<rustc_query_impl[3e42b93bfeb445bd]::queries::check_mod_item_types, rustc_query_impl[3e42b93bfeb445bd]::plumbing::QueryCtxt>::{closure#2}, (rustc_middle[a487dff4633a86d0]::query::erase::Erased<[u8; 0usize]>, rustc_query_system[5e34f8384464b8a5]::dep_graph::graph::DepNodeIndex)>::{closure#0}, (rustc_middle[a487dff4633a86d0]::query::erase::Erased<[u8; 0usize]>, rustc_query_system[5e34f8384464b8a5]::dep_graph::graph::DepNodeIndex)>
  66:     0x7f4d78e5df4d - rustc_query_system[5e34f8384464b8a5]::query::plumbing::try_execute_query::<rustc_query_impl[3e42b93bfeb445bd]::queries::check_mod_item_types, rustc_query_impl[3e42b93bfeb445bd]::plumbing::QueryCtxt>
  67:     0x7f4d78e5d8e9 - <rustc_query_impl[3e42b93bfeb445bd]::Queries as rustc_middle[a487dff4633a86d0]::ty::query::QueryEngine>::check_mod_item_types
  68:     0x7f4d78d11a4f - <rustc_session[99ba0ed9c533f203]::session::Session>::time::<(), rustc_hir_analysis[44791ba5f8e3b26d]::check_crate::{closure#6}>
  69:     0x7f4d78d0ec57 - rustc_hir_analysis[44791ba5f8e3b26d]::check_crate
  70:     0x7f4d78d090bd - rustc_interface[7aa24cde61830128]::passes::analysis
  71:     0x7f4d78f85633 - <std[b70fedfd8b77e9]::thread::local::LocalKey<core[da82827a87f140f9]::cell::Cell<*const ()>>>::with::<rustc_middle[a487dff4633a86d0]::ty::context::tls::enter_context<rustc_query_system[5e34f8384464b8a5]::query::plumbing::execute_job_incr<rustc_query_impl[3e42b93bfeb445bd]::queries::analysis, rustc_query_impl[3e42b93bfeb445bd]::plumbing::QueryCtxt>::{closure#2}, (rustc_middle[a487dff4633a86d0]::query::erase::Erased<[u8; 1usize]>, rustc_query_system[5e34f8384464b8a5]::dep_graph::graph::DepNodeIndex)>::{closure#0}, (rustc_middle[a487dff4633a86d0]::query::erase::Erased<[u8; 1usize]>, rustc_query_system[5e34f8384464b8a5]::dep_graph::graph::DepNodeIndex)>
  72:     0x7f4d78f8510b - rustc_query_system[5e34f8384464b8a5]::query::plumbing::try_execute_query::<rustc_query_impl[3e42b93bfeb445bd]::queries::analysis, rustc_query_impl[3e42b93bfeb445bd]::plumbing::QueryCtxt>
  73:     0x7f4d78f84cd0 - <rustc_query_impl[3e42b93bfeb445bd]::Queries as rustc_middle[a487dff4633a86d0]::ty::query::QueryEngine>::analysis
  74:     0x7f4d78ebb726 - <std[b70fedfd8b77e9]::thread::local::LocalKey<core[da82827a87f140f9]::cell::Cell<*const ()>>>::with::<rustc_middle[a487dff4633a86d0]::ty::context::tls::enter_context<<rustc_middle[a487dff4633a86d0]::ty::context::GlobalCtxt>::enter<rustc_driver_impl[fe6df70259db788d]::run_compiler::{closure#1}::{closure#2}::{closure#4}, core[da82827a87f140f9]::result::Result<(), rustc_span[2f805118d893a80f]::ErrorGuaranteed>>::{closure#0}, core[da82827a87f140f9]::result::Result<(), rustc_span[2f805118d893a80f]::ErrorGuaranteed>>::{closure#0}, core[da82827a87f140f9]::result::Result<(), rustc_span[2f805118d893a80f]::ErrorGuaranteed>>
  75:     0x7f4d78b2202e - <rustc_interface[7aa24cde61830128]::interface::Compiler>::enter::<rustc_driver_impl[fe6df70259db788d]::run_compiler::{closure#1}::{closure#2}, core[da82827a87f140f9]::result::Result<core[da82827a87f140f9]::option::Option<rustc_interface[7aa24cde61830128]::queries::Linker>, rustc_span[2f805118d893a80f]::ErrorGuaranteed>>
  76:     0x7f4d78b1d281 - rustc_span[2f805118d893a80f]::set_source_map::<core[da82827a87f140f9]::result::Result<(), rustc_span[2f805118d893a80f]::ErrorGuaranteed>, rustc_interface[7aa24cde61830128]::interface::run_compiler<core[da82827a87f140f9]::result::Result<(), rustc_span[2f805118d893a80f]::ErrorGuaranteed>, rustc_driver_impl[fe6df70259db788d]::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  77:     0x7f4d78b1c82f - std[b70fedfd8b77e9]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[7aa24cde61830128]::util::run_in_thread_pool_with_globals<rustc_interface[7aa24cde61830128]::interface::run_compiler<core[da82827a87f140f9]::result::Result<(), rustc_span[2f805118d893a80f]::ErrorGuaranteed>, rustc_driver_impl[fe6df70259db788d]::run_compiler::{closure#1}>::{closure#0}, core[da82827a87f140f9]::result::Result<(), rustc_span[2f805118d893a80f]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[da82827a87f140f9]::result::Result<(), rustc_span[2f805118d893a80f]::ErrorGuaranteed>>
  78:     0x7f4d79100661 - <<std[b70fedfd8b77e9]::thread::Builder>::spawn_unchecked_<rustc_interface[7aa24cde61830128]::util::run_in_thread_pool_with_globals<rustc_interface[7aa24cde61830128]::interface::run_compiler<core[da82827a87f140f9]::result::Result<(), rustc_span[2f805118d893a80f]::ErrorGuaranteed>, rustc_driver_impl[fe6df70259db788d]::run_compiler::{closure#1}>::{closure#0}, core[da82827a87f140f9]::result::Result<(), rustc_span[2f805118d893a80f]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[da82827a87f140f9]::result::Result<(), rustc_span[2f805118d893a80f]::ErrorGuaranteed>>::{closure#1} as core[da82827a87f140f9]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  79:     0x7f4d765863b5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::ha1f2224656a778fb
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/alloc/src/boxed.rs:1973:9
  80:     0x7f4d765863b5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::haa29ed9703f354b7
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/alloc/src/boxed.rs:1973:9
  81:     0x7f4d765863b5 - std::sys::unix::thread::Thread::new::thread_start::h33b6dae3e3692197
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys/unix/thread.rs:108:17
  82:     0x7f4d762bbb43 - start_thread
                               at ./nptl/./nptl/pthread_create.c:442:8
  83:     0x7f4d7634da00 - clone3
                               at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
  84:                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.70.0 (90c541806 2023-05-31) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type lib -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 [mir_borrowck] borrow-checking `cli::<impl at cryfs-cli/src/cli.rs:38:1: 38:9>::run_filesystem::{closure#0}::{closure#1}`
#1 [mir_borrowck] borrow-checking `cli::<impl at cryfs-cli/src/cli.rs:38:1: 38:9>::run_filesystem::{closure#0}`
#2 [mir_borrowck] borrow-checking `cli::<impl at cryfs-cli/src/cli.rs:38:1: 38:9>::run_filesystem`
#3 [type_of] computing type of `cli::<impl at cryfs-cli/src/cli.rs:38:1: 38:9>::run_filesystem::{opaque#0}`
#4 [check_mod_item_types] checking item types in module `cli`
#5 [analysis] running analysis passes on this crate
end of query stack
warning: `cryfs-cli` (lib) generated 4 warnings (run `cargo fix --lib -p cryfs-cli` to apply 4 suggestions)
error: could not compile `cryfs-cli` (lib); 4 warnings emitted

@smessmer smessmer 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 Jun 3, 2023
@jyn514 jyn514 added the A-borrow-checker Area: The borrow checker label Jun 4, 2023
@jyn514 jyn514 changed the title ICE: compiler/rustc_borrowck/src/universal_regions.rs:882:36: cannot convert RePlaceholder(Placeholder { universe: U1, bound: BoundRegion { var: 0, kind: BrNamed(DefId(168:840 ~ cryfs_cryfs[97fd]::filesystem::device::CryDevice::'a), 'a) } }) to a region vid ICE: compiler/rustc_borrowck/src/universal_regions.rs:882:36: cannot convert `RePlaceholder(Placeholder { bound: BoundRegion { kind: BrNamed}) to a region vid Jun 4, 2023
@jyn514 jyn514 changed the title ICE: compiler/rustc_borrowck/src/universal_regions.rs:882:36: cannot convert `RePlaceholder(Placeholder { bound: BoundRegion { kind: BrNamed}) to a region vid ICE: compiler/rustc_borrowck/src/universal_regions.rs:882:36: cannot convert RePlaceholder(Placeholder { bound: BoundRegion { kind: BrNamed}) to a region vid Jun 4, 2023
@aliemjay
Copy link
Member

aliemjay commented Jun 7, 2023

This is #109628 causing us to leak placeholders into implied bounds.

Minimized:

trait Trait {
    type Ty<'a> where Self: 'a;
}

impl<T> Trait for T {
    type Ty<'a> = () where Self: 'a;
}

struct Foo<T: Trait>(T)
where
    for<'a> T::Ty<'a>: Sized;

// implied bound: 'static: placeholder('a)
fn test(_: Foo<&'static str>) {}

@aliemjay aliemjay self-assigned this Jun 7, 2023
@aliemjay aliemjay added the S-has-mcve Status: A Minimal Complete and Verifiable Example has been found for this issue label Jun 7, 2023
@bors bors closed this as completed in 4d7f952 Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-borrow-checker Area: The borrow checker C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ S-has-mcve Status: A Minimal Complete and Verifiable Example has been found for this issue 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