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

cannot relate region: LUB(ReErased, ReEmpty(U22)) #75883

Closed
LeCyberDucky opened this issue Aug 24, 2020 · 5 comments · Fixed by #84646
Closed

cannot relate region: LUB(ReErased, ReEmpty(U22)) #75883

LeCyberDucky opened this issue Aug 24, 2020 · 5 comments · Fixed by #84646
Labels
A-lifetimes Area: Lifetimes / regions C-bug Category: This is a bug. E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. glacier ICE tracked in rust-lang/glacier. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-medium Medium priority regression-from-stable-to-stable Performance or correctness regression from one stable version to another. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@LeCyberDucky
Copy link

Hi, it appears that I've stumbled upon an internal compiler error.

Code

I'm sorry that I can't provide a minimal example, but I'm not on a level to understand what is going on (at least for now, heh :P). I'm just here, because the compiler told me to go here. I have, however, pushed a commit of my project in the state that yields the error: https://github.com/LeCyberDucky/bitgeon/tree/Error-handling

The error occurs when running cargo check --bin main or cargo +nightly check --bin main, for that matter.

Meta

rustc --version --verbose:

rustc 1.45.2 (d3fb005a3 2020-07-31)
binary: rustc
commit-hash: d3fb005a39e62501b8b0b356166e515ae24e2e54
commit-date: 2020-07-31
host: x86_64-pc-windows-msvc
release: 1.45.2
LLVM version: 10.0

Also happens on nightly:

rustc 1.47.0-nightly (5180f3da5 2020-08-23)
binary: rustc
commit-hash: 5180f3da5fd72627a8d38558ad1297df38793acd
commit-date: 2020-08-23
host: x86_64-pc-windows-msvc
release: 1.47.0-nightly
LLVM version: 11.0

Error output

error: internal compiler error: src\librustc_infer\infer\lexical_region_resolve\mod.rs:501:17: cannot relate region: LUB(ReErased, ReEmpty(U0))

thread 'rustc' panicked at 'Box<Any>', src\librustc_errors\lib.rs:918:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

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.47.0-nightly (5180f3da5 2020-08-23) running on x86_64-pc-windows-msvc

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

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

thread 'rustc' panicked at 'Box<Any>', src\librustc_errors\lib.rs:918:9
stack backtrace:
   0:     0x7ffa741d9f69 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hfae6a97726d8b736
   1:     0x7ffa74206f7b - core::fmt::write::hce2ddfec834877b8
   2:     0x7ffa741cbae4 - <std::io::IoSlice as core::fmt::Debug>::fmt::h57a15d9f0ff2a3bc
   3:     0x7ffa741df5cb - std::panicking::take_hook::h1925373a96008b93
   4:     0x7ffa741df209 - std::panicking::take_hook::h1925373a96008b93
   5:     0x7ffa4057e2da - rustc_driver::report_ice::h691a614479cbf5f9
   6:     0x7ffa741dff60 - std::panicking::rust_panic_with_hook::h7f7de81d557f54d3
   7:     0x7ffa44ad9420 - rustc_errors::annotate_snippet_emitter_writer::AnnotateSnippetEmitterWriter::ui_testing::h342a15b3ea83deed
   8:     0x7ffa44ad9299 - rustc_errors::annotate_snippet_emitter_writer::AnnotateSnippetEmitterWriter::ui_testing::h342a15b3ea83deed
   9:     0x7ffa44ad93c1 - rustc_errors::annotate_snippet_emitter_writer::AnnotateSnippetEmitterWriter::ui_testing::h342a15b3ea83deed
  10:     0x7ffa44aa741f - rustc_errors::HandlerInner::err_count::hde95b83d37d5673c
  11:     0x7ffa44aa58e2 - rustc_errors::Handler::bug::h8dde62b9b1066bb6
  12:     0x7ffa447b16f8 - rustc_middle::util::bug::bug_fmt::h582d9a3024b38eb2
  13:     0x7ffa447a74c0 - rustc_middle::ty::context::tls::ImplicitCtxt::new::hee3ec7f9c2036613
  14:     0x7ffa447a73f6 - rustc_middle::ty::context::tls::ImplicitCtxt::new::hee3ec7f9c2036613
  15:     0x7ffa447b162c - rustc_middle::util::bug::bug_fmt::h582d9a3024b38eb2
  16:     0x7ffa447b1590 - rustc_middle::util::bug::bug_fmt::h582d9a3024b38eb2
  17:     0x7ffa4441f9d5 - rustc_infer::infer::at::At::eq_impl_headers::h0438c0123706fd52
  18:     0x7ffa4441f60b - rustc_infer::infer::at::At::eq_impl_headers::h0438c0123706fd52
  19:     0x7ffa4441c618 - rustc_infer::infer::at::At::eq_impl_headers::h0438c0123706fd52
  20:     0x7ffa4441ae3e - rustc_infer::infer::at::At::eq_impl_headers::h0438c0123706fd52
  21:     0x7ffa444477a5 - rustc_infer::infer::InferCtxt::resolve_regions_and_report_errors::hdc4ef9538c1690b0
  22:     0x7ffa42c9faa5 - rustc_typeck::check::regionck::<impl rustc_typeck::check::FnCtxt>::regionck_fn::h2c0844d774a487aa
  23:     0x7ffa42ea395e - <rustc_typeck::astconv::PathSeg as core::fmt::Debug>::fmt::hd47536854a836cae
  24:     0x7ffa42ca427f - <rustc_typeck::check::fixup_opaque_types::FixupFolder as rustc_middle::ty::fold::TypeFolder>::fold_ty::h867fe2289cbd19a6
  25:     0x7ffa42e25e7e - <rustc_typeck::check::method::CandidateSource as core::fmt::Debug>::fmt::h9df5f6aadf76f4c6
  26:     0x7ffa42da9b76 - <rustc_typeck::outlives::explicit::ExplicitPredicatesMap as core::fmt::Debug>::fmt::h23984b0fc0edb9dc
  27:     0x7ffa42df3697 - <rustc_typeck::check::wfcheck::CheckTypeWellFormedVisitor as rustc_hir::intravisit::Visitor>::visit_generic_param::hd6c2af7cc4c28074
  28:     0x7ffa42e022d2 - <rustc_typeck::check::wfcheck::CheckTypeWellFormedVisitor as rustc_hir::intravisit::Visitor>::visit_generic_param::hd6c2af7cc4c28074
  29:     0x7ffa42d1133e - rustc_typeck::check::intrinsic::check_platform_intrinsic_type::h10efa74617b992ec
  30:     0x7ffa42e45e8a - <rustc_typeck::collect::AnonConstInParamListDetector as rustc_hir::intravisit::Visitor>::visit_anon_const::h7a95589413018206
  31:     0x7ffa42decfa1 - <rustc_typeck::check::wfcheck::CheckTypeWellFormedVisitor as rustc_hir::intravisit::Visitor>::visit_generic_param::hd6c2af7cc4c28074
  32:     0x7ffa42da9200 - <rustc_typeck::outlives::explicit::ExplicitPredicatesMap as core::fmt::Debug>::fmt::h23984b0fc0edb9dc
  33:     0x7ffa42df444b - <rustc_typeck::check::wfcheck::CheckTypeWellFormedVisitor as rustc_hir::intravisit::Visitor>::visit_generic_param::hd6c2af7cc4c28074
  34:     0x7ffa42e045dc - <rustc_typeck::check::wfcheck::CheckTypeWellFormedVisitor as rustc_hir::intravisit::Visitor>::visit_generic_param::hd6c2af7cc4c28074
  35:     0x7ffa42d28c5b - rustc_typeck::check::intrinsic::check_platform_intrinsic_type::h10efa74617b992ec
  36:     0x7ffa42e1cd41 - rustc_typeck::check::method::probe::provide::h9dacf3c90b52281a
  37:     0x7ffa42e17486 - rustc_typeck::check::method::probe::provide::h9dacf3c90b52281a
  38:     0x7ffa42e16022 - rustc_typeck::check::method::probe::provide::h9dacf3c90b52281a
  39:     0x7ffa42eb2697 - <rustc_typeck::astconv::PathSeg as core::fmt::Debug>::fmt::hd47536854a836cae
  40:     0x7ffa42c79f96 - rustc_typeck::check::method::probe::<impl rustc_typeck::check::FnCtxt>::probe_for_name::hfd99b115a5e97702
  41:     0x7ffa42c87c16 - rustc_typeck::check::method::<impl rustc_typeck::check::FnCtxt>::lookup_method::h605ea8d44c69baf9
  42:     0x7ffa42c65cf0 - rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation::h31fe46ad61575e66
  43:     0x7ffa42c65346 - rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation::h31fe46ad61575e66
  44:     0x7ffa42cc6137 - rustc_typeck::check::FnCtxt::check_stmt::he9fdfdadf00ae15c
  45:     0x7ffa42cc6b16 - rustc_typeck::check::FnCtxt::check_block_no_value::h587532fce6d42b9a
  46:     0x7ffa42c658a8 - rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation::h31fe46ad61575e66
  47:     0x7ffa42c65346 - rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation::h31fe46ad61575e66
  48:     0x7ffa42c4b9df - rustc_typeck::check::_match::<impl rustc_typeck::check::FnCtxt>::check_match::ha2741c781afdaf34
  49:     0x7ffa42c65a2f - rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation::h31fe46ad61575e66
  50:     0x7ffa42c65346 - rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation::h31fe46ad61575e66
  51:     0x7ffa42cc6b4d - rustc_typeck::check::FnCtxt::check_block_no_value::h587532fce6d42b9a
  52:     0x7ffa42cc647a - rustc_typeck::check::FnCtxt::check_block_no_value::h587532fce6d42b9a
  53:     0x7ffa42c6efbf - rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation::h31fe46ad61575e66
  54:     0x7ffa42c65346 - rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation::h31fe46ad61575e66
  55:     0x7ffa42cc5f2c - rustc_typeck::check::FnCtxt::check_stmt::he9fdfdadf00ae15c
  56:     0x7ffa42cc6b16 - rustc_typeck::check::FnCtxt::check_block_no_value::h587532fce6d42b9a
  57:     0x7ffa42c658a8 - rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation::h31fe46ad61575e66
  58:     0x7ffa42c65346 - rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation::h31fe46ad61575e66
  59:     0x7ffa42c77718 - rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation::h31fe46ad61575e66
  60:     0x7ffa42ca5bf0 - <rustc_typeck::check::GatherLocalsVisitor as rustc_hir::intravisit::Visitor>::visit_pat::h91ac2640bc869925
  61:     0x7ffa42ea33f1 - <rustc_typeck::astconv::PathSeg as core::fmt::Debug>::fmt::hd47536854a836cae
  62:     0x7ffa42ca427f - <rustc_typeck::check::fixup_opaque_types::FixupFolder as rustc_middle::ty::fold::TypeFolder>::fold_ty::h867fe2289cbd19a6
  63:     0x7ffa42e25e7e - <rustc_typeck::check::method::CandidateSource as core::fmt::Debug>::fmt::h9df5f6aadf76f4c6
  64:     0x7ffa42da9b76 - <rustc_typeck::outlives::explicit::ExplicitPredicatesMap as core::fmt::Debug>::fmt::h23984b0fc0edb9dc
  65:     0x7ffa42df3697 - <rustc_typeck::check::wfcheck::CheckTypeWellFormedVisitor as rustc_hir::intravisit::Visitor>::visit_generic_param::hd6c2af7cc4c28074
  66:     0x7ffa42e022d2 - <rustc_typeck::check::wfcheck::CheckTypeWellFormedVisitor as rustc_hir::intravisit::Visitor>::visit_generic_param::hd6c2af7cc4c28074
  67:     0x7ffa42d1133e - rustc_typeck::check::intrinsic::check_platform_intrinsic_type::h10efa74617b992ec
  68:     0x7ffa42e45e8a - <rustc_typeck::collect::AnonConstInParamListDetector as rustc_hir::intravisit::Visitor>::visit_anon_const::h7a95589413018206
  69:     0x7ffa42e25db1 - <rustc_typeck::check::method::CandidateSource as core::fmt::Debug>::fmt::h9df5f6aadf76f4c6
  70:     0x7ffa42da9200 - <rustc_typeck::outlives::explicit::ExplicitPredicatesMap as core::fmt::Debug>::fmt::h23984b0fc0edb9dc
  71:     0x7ffa42df444b - <rustc_typeck::check::wfcheck::CheckTypeWellFormedVisitor as rustc_hir::intravisit::Visitor>::visit_generic_param::hd6c2af7cc4c28074
  72:     0x7ffa42e045dc - <rustc_typeck::check::wfcheck::CheckTypeWellFormedVisitor as rustc_hir::intravisit::Visitor>::visit_generic_param::hd6c2af7cc4c28074
  73:     0x7ffa42d28c5b - rustc_typeck::check::intrinsic::check_platform_intrinsic_type::h10efa74617b992ec
  74:     0x7ffa42d64791 - rustc_typeck::check::intrinsic::check_platform_intrinsic_type::h10efa74617b992ec
  75:     0x7ffa42e40b1e - <rustc_typeck::collect::CollectItemTypesVisitor as rustc_hir::intravisit::Visitor>::visit_impl_item::h36434602c51150aa
  76:     0x7ffa42e3cabb - <rustc_typeck::coherence::unsafety::UnsafetyChecker as rustc_hir::itemlikevisit::ItemLikeVisitor>::visit_item::hce7e1143b3799b82
  77:     0x7ffa42d6f65d - rustc_typeck::check::intrinsic::check_platform_intrinsic_type::h10efa74617b992ec
  78:     0x7ffa42dab9e6 - <rustc_typeck::outlives::explicit::ExplicitPredicatesMap as core::fmt::Debug>::fmt::h23984b0fc0edb9dc
  79:     0x7ffa42df68af - <rustc_typeck::check::wfcheck::CheckTypeWellFormedVisitor as rustc_hir::intravisit::Visitor>::visit_generic_param::hd6c2af7cc4c28074
  80:     0x7ffa42e03092 - <rustc_typeck::check::wfcheck::CheckTypeWellFormedVisitor as rustc_hir::intravisit::Visitor>::visit_generic_param::hd6c2af7cc4c28074
  81:     0x7ffa42d17908 - rustc_typeck::check::intrinsic::check_platform_intrinsic_type::h10efa74617b992ec
  82:     0x7ffa42d641c5 - rustc_typeck::check::intrinsic::check_platform_intrinsic_type::h10efa74617b992ec
  83:     0x7ffa42d710c3 - rustc_typeck::check::intrinsic::check_platform_intrinsic_type::h10efa74617b992ec
  84:     0x7ffa42e54717 - rustc_typeck::check_crate::hfa34d01a976dedf2
  85:     0x7ffa4087b65a - rustc_interface::passes::QueryContext::print_stats::h20b8fe0532b52929
  86:     0x7ffa4059c00b - <rustc_driver::DEFAULT_HOOK as core::ops::deref::Deref>::deref::hadcd711a94621615
  87:     0x7ffa4050ca26 - <rustc_lint::BuiltinCombinedEarlyLintPass as rustc_lint::passes::EarlyLintPass>::check_mac_def::hb3829129d340a05d
  88:     0x7ffa40585222 - <rustc_driver::DEFAULT_HOOK as core::ops::deref::Deref>::deref::hadcd711a94621615
  89:     0x7ffa40592032 - <rustc_driver::DEFAULT_HOOK as core::ops::deref::Deref>::deref::hadcd711a94621615
  90:     0x7ffa40540ca3 - <rustc_middle::traits::chalk::RustInterner as chalk_ir::interner::Interner>::generic_arg_data::h71f2dc6ba8dcf3ae
  91:     0x7ffa4059cd7b - <rustc_driver::DEFAULT_HOOK as core::ops::deref::Deref>::deref::hadcd711a94621615
  92:     0x7ffa405332cc - <rustc_driver::args::Error as core::fmt::Debug>::fmt::h02e1be4607868908
  93:     0x7ffa4059f1ab - <rustc_driver::DEFAULT_HOOK as core::ops::deref::Deref>::deref::hadcd711a94621615
  94:     0x7ffa4058bce0 - <rustc_driver::DEFAULT_HOOK as core::ops::deref::Deref>::deref::hadcd711a94621615
  95:     0x7ffa40592d89 - <rustc_driver::DEFAULT_HOOK as core::ops::deref::Deref>::deref::hadcd711a94621615
  96:     0x7ffa4052b7b3 - <rustc_middle::ty::SymbolName as core::fmt::Display>::fmt::h6ff509d3525ea80f
  97:     0x7ffa741efcca - std::sys::windows::thread::Thread::new::h84550e08827b3a3a
  98:     0x7ffab0816fd4 - BaseThreadInitThunk
  99:     0x7ffab18fcec1 - 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.47.0-nightly (5180f3da5 2020-08-23) running on x86_64-pc-windows-msvc

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

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

query stack during panic:
#0 [typeck] type-checking `ui::UI::interact`
#1 [fn_sig] computing function signature of `ui::UI::interact`
#2 [typeck] type-checking `ui::UI::run`
#3 [fn_sig] computing function signature of `ui::UI::run`
#4 [collect_mod_item_types] collecting item types in module `ui`
#5 [analysis] running analysis passes on this crate
end of query stack

I hope this helps. Please tell me, if there's more you need me to do. 🦀

@LeCyberDucky LeCyberDucky 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 Aug 24, 2020
@jonas-schievink jonas-schievink added A-lifetimes Area: Lifetimes / regions I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Aug 24, 2020
@csmoe csmoe added the E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example label Aug 25, 2020
@matthiaskrgr
Copy link
Member

reduced:

pub struct UI {}

impl UI {
    pub fn run() -> Result<_> {
        let mut ui = UI {};
        ui.interact();

        unimplemented!();
    }

    pub fn interact(&mut self) -> Result<_> {
        unimplemented!();
    }
}

@tesuji

This comment has been minimized.

@rustbot rustbot removed the E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example label Aug 25, 2020
@spastorino
Copy link
Member

spastorino commented Aug 26, 2020

Assigning P-medium as discussed as part of the Prioritization Working Group procedure and removing I-prioritize.

@spastorino spastorino added P-medium Medium priority and removed I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Aug 26, 2020
@rust-lang-glacier-bot rust-lang-glacier-bot added the glacier ICE tracked in rust-lang/glacier. label Sep 8, 2020
@matthiaskrgr
Copy link
Member

This ICEs since 1.44
@rustbot modify labels: +regression-from-stable-to-stable

@rustbot rustbot added the regression-from-stable-to-stable Performance or correctness regression from one stable version to another. label Dec 20, 2020
@JohnTitor
Copy link
Member

This issue has been fixed by #82494, marking as E-needs-test.

@JohnTitor JohnTitor added the E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. label Feb 28, 2021
JohnTitor added a commit to JohnTitor/rust that referenced this issue Apr 28, 2021
m-ou-se added a commit to m-ou-se/rust that referenced this issue Apr 28, 2021
…tests, r=Dylan-DPC

Add some regression tests related to rust-lang#82494

Closes rust-lang#75883, closes rust-lang#80779
r? `@estebank`
jackh726 added a commit to jackh726/rust that referenced this issue Apr 28, 2021
…tests, r=Dylan-DPC

Add some regression tests related to rust-lang#82494

Closes rust-lang#75883, closes rust-lang#80779
r? ``@estebank``
jackh726 added a commit to jackh726/rust that referenced this issue Apr 29, 2021
…tests, r=Dylan-DPC

Add some regression tests related to rust-lang#82494

Closes rust-lang#75883, closes rust-lang#80779
r? ```@estebank```
@bors bors closed this as completed in 96c2316 Apr 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lifetimes Area: Lifetimes / regions C-bug Category: This is a bug. E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. glacier ICE tracked in rust-lang/glacier. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-medium Medium priority regression-from-stable-to-stable Performance or correctness regression from one stable version to another. 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.

9 participants