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 bound region #101188

Closed
ProkopRandacek opened this issue Aug 30, 2022 · 4 comments
Closed

Cannot relate bound region #101188

ProkopRandacek opened this issue Aug 30, 2022 · 4 comments
Assignees
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

@ProkopRandacek
Copy link

Code

use plotters::prelude::*;
use std::collections::BTreeMap;

fn main() {
    let days = BTreeMap::new();

    let root = BitMapBackend::new("img.png", (1, 1)).into_drawing_area();

    let chart = ChartBuilder::on(&root)
        .build_cartesian_2d(0..(days.len() - 1), 0..0)
        .unwrap();

    chart.draw_series(AreaSeries::new(days.iter(), &0, &RED.mix(0.2)));
}

Meta

rustc --version --verbose:

rustc 1.65.0-nightly (bc4b39c27 2022-08-29)
binary: rustc
commit-hash: bc4b39c271bbd36736cbf1c0a1ac23d5df38d365
commit-date: 2022-08-29
host: x86_64-unknown-linux-gnu
release: 1.65.0-nightly
LLVM version: 15.0.0
Error output

~/code/icemin 101 % cargo check
    Checking gitstats v0.1.0 (/home/prokop/code/icemin)
error: internal compiler error: compiler/rustc_infer/src/infer/region_constraints/mod.rs:568:17: cannot relate bound region: ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(20:611 ~ plotters[4c18]::chart::context::{impl#1}::draw_series::'b), 'b) }) <= '_#18r

thread 'rustc' panicked at 'Box<dyn Any>', /rustc/bc4b39c271bbd36736cbf1c0a1ac23d5df38d365/compiler/rustc_errors/src/lib.rs:1393:9
stack backtrace:
   0:     0x7fe0097142c0 - std::backtrace_rs::backtrace::libunwind::trace::hb9e3f06cbbaf492a
                               at /rustc/bc4b39c271bbd36736cbf1c0a1ac23d5df38d365/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   1:     0x7fe0097142c0 - std::backtrace_rs::backtrace::trace_unsynchronized::hf22eb4ea358103d0
                               at /rustc/bc4b39c271bbd36736cbf1c0a1ac23d5df38d365/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7fe0097142c0 - std::sys_common::backtrace::_print_fmt::h410b634985486d38
                               at /rustc/bc4b39c271bbd36736cbf1c0a1ac23d5df38d365/library/std/src/sys_common/backtrace.rs:66:5
   3:     0x7fe0097142c0 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h0bb3ddfe30f34722
                               at /rustc/bc4b39c271bbd36736cbf1c0a1ac23d5df38d365/library/std/src/sys_common/backtrace.rs:45:22
   4:     0x7fe00976f07e - core::fmt::write::h5139e029a15488c6
                               at /rustc/bc4b39c271bbd36736cbf1c0a1ac23d5df38d365/library/core/src/fmt/mod.rs:1202:17
   5:     0x7fe009704e95 - std::io::Write::write_fmt::hb5ef4fccb2e8551e
                               at /rustc/bc4b39c271bbd36736cbf1c0a1ac23d5df38d365/library/std/src/io/mod.rs:1679:15
   6:     0x7fe009716f53 - std::sys_common::backtrace::_print::h00337f693e51d1e5
                               at /rustc/bc4b39c271bbd36736cbf1c0a1ac23d5df38d365/library/std/src/sys_common/backtrace.rs:48:5
   7:     0x7fe009716f53 - std::sys_common::backtrace::print::h9dd0be40e457d681
                               at /rustc/bc4b39c271bbd36736cbf1c0a1ac23d5df38d365/library/std/src/sys_common/backtrace.rs:35:9
   8:     0x7fe009716f53 - std::panicking::default_hook::{{closure}}::h0e5eec102072dfd9
                               at /rustc/bc4b39c271bbd36736cbf1c0a1ac23d5df38d365/library/std/src/panicking.rs:295:22
   9:     0x7fe009716c3f - std::panicking::default_hook::hfae7e09a8d623867
                               at /rustc/bc4b39c271bbd36736cbf1c0a1ac23d5df38d365/library/std/src/panicking.rs:314:9
  10:     0x7fe00bf6b114 - <rustc_driver[b311c33b4b16ca3f]::DEFAULT_HOOK::{closure#0}::{closure#0} as core[2b6696551aa632ca]::ops::function::FnOnce<(&core[2b6696551aa632ca]::panic::panic_info::PanicInfo,)>>::call_once::{shim:vtable#0}
  11:     0x7fe00971778d - std::panicking::rust_panic_with_hook::h3944852bb7a2fcf7
                               at /rustc/bc4b39c271bbd36736cbf1c0a1ac23d5df38d365/library/std/src/panicking.rs:702:17
  12:     0x7fe00ce63471 - std[a929eca8c52a41fd]::panicking::begin_panic::<rustc_errors[9be06298f6201566]::ExplicitBug>::{closure#0}
  13:     0x7fe00ce616c6 - std[a929eca8c52a41fd]::sys_common::backtrace::__rust_end_short_backtrace::<std[a929eca8c52a41fd]::panicking::begin_panic<rustc_errors[9be06298f6201566]::ExplicitBug>::{closure#0}, !>
  14:     0x7fe00ce610d6 - std[a929eca8c52a41fd]::panicking::begin_panic::<rustc_errors[9be06298f6201566]::ExplicitBug>
  15:     0x7fe00ce55886 - std[a929eca8c52a41fd]::panic::panic_any::<rustc_errors[9be06298f6201566]::ExplicitBug>
  16:     0x7fe00ce549b1 - <rustc_errors[9be06298f6201566]::HandlerInner>::span_bug::<rustc_span[ee8046e111b904ae]::span_encoding::Span, &alloc[f1371c15afa81d6f]::string::String>
  17:     0x7fe00ce54870 - <rustc_errors[9be06298f6201566]::Handler>::span_bug::<rustc_span[ee8046e111b904ae]::span_encoding::Span, &alloc[f1371c15afa81d6f]::string::String>
  18:     0x7fe00ce3d678 - rustc_middle[32ddb298bfe9ff01]::ty::context::tls::with_context_opt::<rustc_middle[32ddb298bfe9ff01]::ty::context::tls::with_opt<rustc_middle[32ddb298bfe9ff01]::util::bug::opt_span_bug_fmt<rustc_span[ee8046e111b904ae]::span_encoding::Span>::{closure#0}, ()>::{closure#0}, ()>
  19:     0x7fe00ce3d516 - rustc_middle[32ddb298bfe9ff01]::util::bug::opt_span_bug_fmt::<rustc_span[ee8046e111b904ae]::span_encoding::Span>
  20:     0x7fe00ce3d4d4 - rustc_middle[32ddb298bfe9ff01]::util::bug::span_bug_fmt::<rustc_span[ee8046e111b904ae]::span_encoding::Span>
  21:     0x7fe00ac68a2a - <rustc_infer[7c3efacd44cabbce]::infer::region_constraints::RegionConstraintCollector>::make_eqregion
  22:     0x7fe00a9c671b - rustc_middle[32ddb298bfe9ff01]::ty::relate::super_relate_tys::<rustc_infer[7c3efacd44cabbce]::infer::equate::Equate>
  23:     0x7fe00a8a5fda - <rustc_infer[7c3efacd44cabbce]::infer::equate::Equate as rustc_middle[32ddb298bfe9ff01]::ty::relate::TypeRelation>::tys
  24:     0x7fe00b2bc7ef - <rustc_infer[7c3efacd44cabbce]::infer::at::At>::eq::<rustc_middle[32ddb298bfe9ff01]::ty::Ty>
  25:     0x7fe00ccf6bd1 - <rustc_infer[7c3efacd44cabbce]::infer::InferCtxt>::can_eq::<rustc_middle[32ddb298bfe9ff01]::ty::Ty>
  26:     0x7fe00ccfca9d - <rustc_infer[7c3efacd44cabbce]::infer::InferCtxt as rustc_trait_selection[a6c378f75b269f3d]::traits::error_reporting::suggestions::InferCtxtExt>::suggest_dereferences
  27:     0x7fe00cd15cf6 - <rustc_infer[7c3efacd44cabbce]::infer::InferCtxt as rustc_trait_selection[a6c378f75b269f3d]::traits::error_reporting::InferCtxtExt>::report_selection_error
  28:     0x7fe00cd1fb0a - <rustc_infer[7c3efacd44cabbce]::infer::InferCtxt as rustc_trait_selection[a6c378f75b269f3d]::traits::error_reporting::InferCtxtPrivExt>::report_fulfillment_error
  29:     0x7fe00cd12504 - <rustc_infer[7c3efacd44cabbce]::infer::InferCtxt as rustc_trait_selection[a6c378f75b269f3d]::traits::error_reporting::InferCtxtExt>::report_fulfillment_errors
  30:     0x7fe00abbd607 - <rustc_typeck[a473fb42d3414210]::check::fn_ctxt::FnCtxt>::check_argument_types
  31:     0x7fe00ab26240 - <rustc_typeck[a473fb42d3414210]::check::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  32:     0x7fe00ab556ae - <rustc_typeck[a473fb42d3414210]::check::fn_ctxt::FnCtxt>::check_block_with_expected
  33:     0x7fe00ab24856 - <rustc_typeck[a473fb42d3414210]::check::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  34:     0x7fe00b48ba3d - <rustc_typeck[a473fb42d3414210]::check::fn_ctxt::FnCtxt>::check_return_expr
  35:     0x7fe00b488b0b - rustc_typeck[a473fb42d3414210]::check::check::check_fn
  36:     0x7fe00b47b943 - <rustc_infer[7c3efacd44cabbce]::infer::InferCtxtBuilder>::enter::<&rustc_middle[32ddb298bfe9ff01]::ty::context::TypeckResults, <rustc_typeck[a473fb42d3414210]::check::inherited::InheritedBuilder>::enter<rustc_typeck[a473fb42d3414210]::check::typeck_with_fallback<rustc_typeck[a473fb42d3414210]::check::typeck::{closure#0}>::{closure#1}, &rustc_middle[32ddb298bfe9ff01]::ty::context::TypeckResults>::{closure#0}>
  37:     0x7fe00b4795b4 - rustc_typeck[a473fb42d3414210]::check::typeck
  38:     0x7fe00b676c0d - <rustc_query_system[f6a45aea11899bc0]::dep_graph::graph::DepGraph<rustc_middle[32ddb298bfe9ff01]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[32ddb298bfe9ff01]::ty::context::TyCtxt, rustc_span[ee8046e111b904ae]::def_id::LocalDefId, &rustc_middle[32ddb298bfe9ff01]::ty::context::TypeckResults>
  39:     0x7fe00b66f5d4 - rustc_query_system[f6a45aea11899bc0]::query::plumbing::try_execute_query::<rustc_query_impl[7a0282005eec16be]::plumbing::QueryCtxt, rustc_query_system[f6a45aea11899bc0]::query::caches::DefaultCache<rustc_span[ee8046e111b904ae]::def_id::LocalDefId, &rustc_middle[32ddb298bfe9ff01]::ty::context::TypeckResults>>
  40:     0x7fe00be62b1a - <rustc_query_impl[7a0282005eec16be]::Queries as rustc_middle[32ddb298bfe9ff01]::ty::query::QueryEngine>::typeck
  41:     0x7fe00bca557b - rustc_data_structures[4644a566fb33bab8]::sync::par_for_each_in::<&[rustc_span[ee8046e111b904ae]::def_id::LocalDefId], <rustc_middle[32ddb298bfe9ff01]::hir::map::Map>::par_body_owners<rustc_typeck[a473fb42d3414210]::check::typeck_item_bodies::{closure#0}>::{closure#0}>
  42:     0x7fe00bca5333 - rustc_typeck[a473fb42d3414210]::check::typeck_item_bodies
  43:     0x7fe00bba0ed5 - <rustc_query_system[f6a45aea11899bc0]::dep_graph::graph::DepGraph<rustc_middle[32ddb298bfe9ff01]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[32ddb298bfe9ff01]::ty::context::TyCtxt, (), ()>
  44:     0x7fe00bb9ff21 - rustc_query_system[f6a45aea11899bc0]::query::plumbing::try_execute_query::<rustc_query_impl[7a0282005eec16be]::plumbing::QueryCtxt, rustc_query_system[f6a45aea11899bc0]::query::caches::DefaultCache<(), ()>>
  45:     0x7fe00bb9f913 - rustc_query_system[f6a45aea11899bc0]::query::plumbing::get_query::<rustc_query_impl[7a0282005eec16be]::queries::typeck_item_bodies, rustc_query_impl[7a0282005eec16be]::plumbing::QueryCtxt>
  46:     0x7fe00b945a7f - <rustc_session[543fb9aa940dcbef]::session::Session>::time::<(), rustc_typeck[a473fb42d3414210]::check_crate::{closure#7}>
  47:     0x7fe00b94563f - rustc_typeck[a473fb42d3414210]::check_crate
  48:     0x7fe00b943432 - rustc_interface[f8dadb4d01f4b8e8]::passes::analysis
  49:     0x7fe00bcf55e2 - <rustc_query_system[f6a45aea11899bc0]::dep_graph::graph::DepGraph<rustc_middle[32ddb298bfe9ff01]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[32ddb298bfe9ff01]::ty::context::TyCtxt, (), core[2b6696551aa632ca]::result::Result<(), rustc_errors[9be06298f6201566]::ErrorGuaranteed>>
  50:     0x7fe00bcf4cf0 - rustc_query_system[f6a45aea11899bc0]::query::plumbing::try_execute_query::<rustc_query_impl[7a0282005eec16be]::plumbing::QueryCtxt, rustc_query_system[f6a45aea11899bc0]::query::caches::DefaultCache<(), core[2b6696551aa632ca]::result::Result<(), rustc_errors[9be06298f6201566]::ErrorGuaranteed>>>
  51:     0x7fe00bcf47b0 - rustc_query_system[f6a45aea11899bc0]::query::plumbing::get_query::<rustc_query_impl[7a0282005eec16be]::queries::analysis, rustc_query_impl[7a0282005eec16be]::plumbing::QueryCtxt>
  52:     0x7fe00b85a00d - <rustc_interface[f8dadb4d01f4b8e8]::passes::QueryContext>::enter::<rustc_driver[b311c33b4b16ca3f]::run_compiler::{closure#1}::{closure#2}::{closure#3}, core[2b6696551aa632ca]::result::Result<(), rustc_errors[9be06298f6201566]::ErrorGuaranteed>>
  53:     0x7fe00b84514e - <rustc_interface[f8dadb4d01f4b8e8]::interface::Compiler>::enter::<rustc_driver[b311c33b4b16ca3f]::run_compiler::{closure#1}::{closure#2}, core[2b6696551aa632ca]::result::Result<core[2b6696551aa632ca]::option::Option<rustc_interface[f8dadb4d01f4b8e8]::queries::Linker>, rustc_errors[9be06298f6201566]::ErrorGuaranteed>>
  54:     0x7fe00b84050c - rustc_span[ee8046e111b904ae]::with_source_map::<core[2b6696551aa632ca]::result::Result<(), rustc_errors[9be06298f6201566]::ErrorGuaranteed>, rustc_interface[f8dadb4d01f4b8e8]::interface::create_compiler_and_run<core[2b6696551aa632ca]::result::Result<(), rustc_errors[9be06298f6201566]::ErrorGuaranteed>, rustc_driver[b311c33b4b16ca3f]::run_compiler::{closure#1}>::{closure#1}>
  55:     0x7fe00b83ff92 - rustc_interface[f8dadb4d01f4b8e8]::interface::create_compiler_and_run::<core[2b6696551aa632ca]::result::Result<(), rustc_errors[9be06298f6201566]::ErrorGuaranteed>, rustc_driver[b311c33b4b16ca3f]::run_compiler::{closure#1}>
  56:     0x7fe00b83eb31 - <scoped_tls[8a2417f93d70a36a]::ScopedKey<rustc_span[ee8046e111b904ae]::SessionGlobals>>::set::<rustc_interface[f8dadb4d01f4b8e8]::interface::run_compiler<core[2b6696551aa632ca]::result::Result<(), rustc_errors[9be06298f6201566]::ErrorGuaranteed>, rustc_driver[b311c33b4b16ca3f]::run_compiler::{closure#1}>::{closure#0}, core[2b6696551aa632ca]::result::Result<(), rustc_errors[9be06298f6201566]::ErrorGuaranteed>>
  57:     0x7fe00b83e81f - std[a929eca8c52a41fd]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[f8dadb4d01f4b8e8]::util::run_in_thread_pool_with_globals<rustc_interface[f8dadb4d01f4b8e8]::interface::run_compiler<core[2b6696551aa632ca]::result::Result<(), rustc_errors[9be06298f6201566]::ErrorGuaranteed>, rustc_driver[b311c33b4b16ca3f]::run_compiler::{closure#1}>::{closure#0}, core[2b6696551aa632ca]::result::Result<(), rustc_errors[9be06298f6201566]::ErrorGuaranteed>>::{closure#0}, core[2b6696551aa632ca]::result::Result<(), rustc_errors[9be06298f6201566]::ErrorGuaranteed>>
  58:     0x7fe00bd8c449 - <<std[a929eca8c52a41fd]::thread::Builder>::spawn_unchecked_<rustc_interface[f8dadb4d01f4b8e8]::util::run_in_thread_pool_with_globals<rustc_interface[f8dadb4d01f4b8e8]::interface::run_compiler<core[2b6696551aa632ca]::result::Result<(), rustc_errors[9be06298f6201566]::ErrorGuaranteed>, rustc_driver[b311c33b4b16ca3f]::run_compiler::{closure#1}>::{closure#0}, core[2b6696551aa632ca]::result::Result<(), rustc_errors[9be06298f6201566]::ErrorGuaranteed>>::{closure#0}, core[2b6696551aa632ca]::result::Result<(), rustc_errors[9be06298f6201566]::ErrorGuaranteed>>::{closure#1} as core[2b6696551aa632ca]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  59:     0x7fe0097215e3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h34d0913e7ab49812
                               at /rustc/bc4b39c271bbd36736cbf1c0a1ac23d5df38d365/library/alloc/src/boxed.rs:1940:9
  60:     0x7fe0097215e3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hdd7e4da868d40930
                               at /rustc/bc4b39c271bbd36736cbf1c0a1ac23d5df38d365/library/alloc/src/boxed.rs:1940:9
  61:     0x7fe0097215e3 - std::sys::unix::thread::Thread::new::thread_start::hf2d1f3a0b6326cb1
                               at /rustc/bc4b39c271bbd36736cbf1c0a1ac23d5df38d365/library/std/src/sys/unix/thread.rs:108:17
  62:     0x7fe00948a78d - <unknown>
  63:     0x7fe00950b8e4 - clone
  64:                0x0 - <unknown>

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.65.0-nightly (bc4b39c27 2022-08-29) running on x86_64-unknown-linux-gnu

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

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

query stack during panic:
#0 [typeck] type-checking `main`
#1 [typeck_item_bodies] type-checking all item bodies
#2 [analysis] running analysis passes on this crate
end of query stack
error: could not compile `gitstats`
~/code/icemin 101 %

Backtrace

~/code/icemin 101 % RUST_BACKTRACE=1 cargo build
   Compiling gitstats v0.1.0 (/home/prokop/code/icemin)
error: internal compiler error: compiler/rustc_infer/src/infer/region_constraints/mod.rs:568:17: cannot relate bound region: ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(20:611 ~ plotters[6bf7]::chart::context::{impl#1}::draw_series::'b), 'b) }) <= '_#18r

thread 'rustc' panicked at 'Box<dyn Any>', /rustc/bc4b39c271bbd36736cbf1c0a1ac23d5df38d365/compiler/rustc_errors/src/lib.rs:1393:9
stack backtrace:
   0: std::panicking::begin_panic::<rustc_errors::ExplicitBug>
   1: std::panic::panic_any::<rustc_errors::ExplicitBug>
   2: <rustc_errors::HandlerInner>::span_bug::<rustc_span::span_encoding::Span, &alloc::string::String>
   3: <rustc_errors::Handler>::span_bug::<rustc_span::span_encoding::Span, &alloc::string::String>
   4: rustc_middle::ty::context::tls::with_context_opt::<rustc_middle::ty::context::tls::with_opt<rustc_middle::util::bug::opt_span_bug_fmt<rustc_span::span_encoding::Span>::{closure#0}, ()>::{closure#0}, ()>
   5: rustc_middle::util::bug::opt_span_bug_fmt::<rustc_span::span_encoding::Span>
   6: rustc_middle::util::bug::span_bug_fmt::<rustc_span::span_encoding::Span>
   7: <rustc_infer::infer::region_constraints::RegionConstraintCollector>::make_eqregion
   8: rustc_middle::ty::relate::super_relate_tys::<rustc_infer::infer::equate::Equate>
   9: <rustc_infer::infer::equate::Equate as rustc_middle::ty::relate::TypeRelation>::tys
  10: <rustc_infer::infer::at::At>::eq::<rustc_middle::ty::Ty>
  11: <rustc_infer::infer::InferCtxt>::can_eq::<rustc_middle::ty::Ty>
  12: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::error_reporting::suggestions::InferCtxtExt>::suggest_dereferences
  13: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::error_reporting::InferCtxtExt>::report_selection_error
  14: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::error_reporting::InferCtxtPrivExt>::report_fulfillment_error
  15: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::error_reporting::InferCtxtExt>::report_fulfillment_errors
  16: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_argument_types
  17: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  18: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_block_with_expected
  19: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  20: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_return_expr
  21: rustc_typeck::check::check::check_fn
  22: <rustc_infer::infer::InferCtxtBuilder>::enter::<&rustc_middle::ty::context::TypeckResults, <rustc_typeck::check::inherited::InheritedBuilder>::enter<rustc_typeck::check::typeck_with_fallback<rustc_typeck::check::typeck::{closure#0}>::{closure#1}, &rustc_middle::ty::context::TypeckResults>::{closure#0}>
  23: rustc_typeck::check::typeck
  24: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, rustc_span::def_id::LocalDefId, &rustc_middle::ty::context::TypeckResults>
  25: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<rustc_span::def_id::LocalDefId, &rustc_middle::ty::context::TypeckResults>>
  26: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::typeck
  27: rustc_data_structures::sync::par_for_each_in::<&[rustc_span::def_id::LocalDefId], <rustc_middle::hir::map::Map>::par_body_owners<rustc_typeck::check::typeck_item_bodies::{closure#0}>::{closure#0}>
  28: rustc_typeck::check::typeck_item_bodies
  29: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, (), ()>
  30: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<(), ()>>
  31: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::typeck_item_bodies, rustc_query_impl::plumbing::QueryCtxt>
  32: <rustc_session::session::Session>::time::<(), rustc_typeck::check_crate::{closure#7}>
  33: rustc_typeck::check_crate
  34: rustc_interface::passes::analysis
  35: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, (), core::result::Result<(), rustc_errors::ErrorGuaranteed>>
  36: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<(), core::result::Result<(), rustc_errors::ErrorGuaranteed>>>
  37: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::analysis, rustc_query_impl::plumbing::QueryCtxt>
  38: <rustc_interface::passes::QueryContext>::enter::<rustc_driver::run_compiler::{closure#1}::{closure#2}::{closure#3}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
  39: <rustc_interface::interface::Compiler>::enter::<rustc_driver::run_compiler::{closure#1}::{closure#2}, core::result::Result<core::option::Option<rustc_interface::queries::Linker>, rustc_errors::ErrorGuaranteed>>
  40: rustc_span::with_source_map::<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_interface::interface::create_compiler_and_run<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#1}>
  41: rustc_interface::interface::create_compiler_and_run::<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>
  42: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose 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.65.0-nightly (bc4b39c27 2022-08-29) running on x86_64-unknown-linux-gnu

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

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

query stack during panic:
#0 [typeck] type-checking `main`
#1 [typeck_item_bodies] type-checking all item bodies
#2 [analysis] running analysis passes on this crate
end of query stack
error: could not compile `gitstats`
~/code/icemin 101 %

Sorry for the plotters dependency. I was unable to factor it out. The error disapperas if I remove any of the days.len(), days.iter() or chart.draw_series() calls.

@ProkopRandacek ProkopRandacek 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 30, 2022
@5225225
Copy link
Contributor

5225225 commented Aug 30, 2022

searched nightlies: from nightly-2022-08-21 to nightly-2022-08-27
regressed nightly: nightly-2022-08-23
searched commit range: c0941df...015a824
regressed commit: 0b71ffc

bisected with cargo-bisect-rustc v0.6.4

Host triple: x86_64-unknown-linux-gnu
Reproduce with:

cargo bisect-rustc --regress=ice -- build 

Also, maybe similar to #101020 but that one requires nightly, this does not (even though it doesn't fail on stable).

@compiler-errors
Copy link
Member

hehe I'll fix this if not fixed by the same fix as #101020, probably is though

@compiler-errors compiler-errors self-assigned this Aug 30, 2022
@compiler-errors
Copy link
Member

I'll test this in a few days when #101020 is on nightly

@compiler-errors
Copy link
Member

This no longer ICEs as far as I can tell.

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