Skip to content

ICE: RegionKind::ReError constructed but no error reported #108170

Closed

Description

@saethlin

Possibly related to #107988 ?

Code

cargo +nightly test in chwp v1.183.0
The error message is in building assertor v0.0.1 but I can't reproduce with just building that crate, which is odd.

Meta

rustc --version --verbose:

rustc 1.69.0-nightly (9a7cc6c32 2023-02-16)
binary: rustc
commit-hash: 9a7cc6c32f1a690f86827e4724bcda85e506ef35
commit-date: 2023-02-16
host: x86_64-unknown-linux-gnu
release: 1.69.0-nightly
LLVM version: 15.0.7

Error output

error: internal compiler error: no errors encountered even though `delay_span_bug` issued

error: internal compiler error: RegionKind::ReError constructed but no error reported
Backtrace

error: internal compiler error: no errors encountered even though `delay_span_bug` issued

error: internal compiler error: RegionKind::ReError constructed but no error reported
  |
  = note: delayed at    0: <rustc_errors::HandlerInner>::emit_diagnostic
             1: <rustc_errors::Handler>::delay_span_bug::<rustc_span::span_encoding::Span, &str>
             2: <rustc_middle::ty::context::TyCtxt>::mk_re_error_misc
             3: rustc_infer::infer::lexical_region_resolve::resolve
             4: <rustc_infer::infer::InferCtxt>::resolve_regions
             5: rustc_hir_analysis::check::compare_impl_item::compare_method_predicate_entailment
             6: rustc_hir_analysis::check::compare_impl_item::compare_impl_method
             7: rustc_hir_analysis::check::check::check_mod_item_types
             8: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::queries::check_mod_item_types, rustc_query_impl::plumbing::QueryCtxt>
             9: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::check_mod_item_types
            10: <rustc_middle::hir::map::Map>::for_each_module::<rustc_hir_analysis::check_crate::{closure#6}::{closure#0}>
            11: rustc_hir_analysis::check_crate
            12: rustc_interface::passes::analysis
            13: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::queries::analysis, rustc_query_impl::plumbing::QueryCtxt>
            14: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::analysis
            15: <rustc_interface::queries::QueryResult<&rustc_middle::ty::context::GlobalCtxt>>::enter::<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}::{closure#2}::{closure#3}>
            16: <rustc_interface::interface::Compiler>::enter::<rustc_driver_impl::run_compiler::{closure#1}::{closure#2}, core::result::Result<core::option::Option<rustc_interface::queries::Linker>, rustc_errors::ErrorGuaranteed>>
            17: rustc_span::with_source_map::<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
            18: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
            19: std::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
            20: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
            21: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
                       at /rustc/9a7cc6c32f1a690f86827e4724bcda85e506ef35/library/alloc/src/boxed.rs:1988:9
            22: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
                       at /rustc/9a7cc6c32f1a690f86827e4724bcda85e506ef35/library/alloc/src/boxed.rs:1988:9
            23: std::sys::unix::thread::Thread::new::thread_start
                       at /rustc/9a7cc6c32f1a690f86827e4724bcda85e506ef35/library/std/src/sys/unix/thread.rs:108:17
            24: <unknown>
            25: <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 (9a7cc6c32 2023-02-16) running on x86_64-unknown-linux-gnu

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

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

query stack during panic:
end of query stack
error: could not compile `assertor`; 1 warning emitted
warning: build failed, waiting for other jobs to finish...

Activity

  1. added
    C-bugCategory: This is a bug.
    I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    on Feb 17, 2023
  2. saethlin commented on Feb 17, 2023

    @saethlin
    MemberAuthor

    @rustbot label +E-needs-mcve

  3. added
    E-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example
    on Feb 17, 2023
  4. compiler-errors commented on Feb 17, 2023

    @compiler-errors
    Contributor

    I'm pretty sure I know how to make an MCVE for this.

    @rustbot claim

  5. compiler-errors commented on Feb 17, 2023

    @compiler-errors
    Contributor

    Ah, lol, it's because google/assertor#1 hasn't landed, and a recent ReError PR made it delay a bug that should've been handled more gracefully.

    The error message is in building assertor v0.0.1 but I can't reproduce with just building that crate, which is odd.

    If you build assertor with -Aimplied_bounds_entailment (or add #![allow(implied_bounds_entailment)]) then it ICEs similarly.

  6. added 2 commits that reference this issue on Feb 22, 2023
    13a36d0
    4d9effc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

C-bugCategory: This is a bug.E-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions