Repository navigation
Closed
Labels
A-impl-traitArea: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.Area: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.A-incr-compArea: Incremental compilationArea: Incremental compilationC-bugCategory: This is a bug.Category: This is a bug.F-impl_trait_in_bindings`#![feature(impl_trait_in_bindings)]``#![feature(impl_trait_in_bindings)]`I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way. When possible, use a F-* label instead.This issue requires a nightly compiler in some way. When possible, use a F-* label instead.
Description
When trying to build https://github.com/DutchGhost/rust_fun/tree/dev , I found some weird ICE.
Running cargo build for a first time works fine. If then any of the files is altered, for example by inserting a newline, and then running cargo build again, results in the ICE.
cargo clean gets rid of the ICE again.
Backtrace:
thread 'main' panicked at 'index out of bounds: the len is 7275 but the index is 7275', libcore\slice\mod.rs:2454:14
stack backtrace:
0: <std::sync::mpsc::select::Select as core::fmt::Debug>::fmt
1: <std::path::Iter<'a> as core::convert::AsRef<std::path::Path>>::as_ref
2: std::panicking::take_hook
3: std::panicking::take_hook
4: rustc::ty::structural_impls::<impl rustc::ty::context::Lift<'tcx> for rustc::mir::interpret::error::EvalError<'a>>::lift_to_tcx
5: std::panicking::rust_panic_with_hook
6: std::panicking::begin_panic_fmt
7: rust_begin_unwind
8: core::panicking::panic_fmt
9: core::panicking::panic_bounds_check
10: rustc::dep_graph::graph::DepGraph::assert_ignored
11: rustc::ty::context::tls::track_diagnostic
12: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::try_print_query_stack
13: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::try_print_query_stack
14: rustc::ty::context::TyCtxt::generate_borrow_of_any_match_input
15: <unknown>
16: rustc::ty::context::tls::track_diagnostic
17: rustc::ty::query::on_disk_cache::OnDiskCache::load_diagnostics
18: rustc::dep_graph::graph::DepGraph::try_mark_green
19: rustc::dep_graph::graph::DepGraph::try_mark_green
20: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::try_print_query_stack
21: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::try_print_query_stack
22: <rustc::hir::check_attr::CheckAttrVisitor<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_item
23: rustc::hir::Crate::impl_item
24: rustc::hir::check_attr::check_crate
25: <rustc_driver::derive_registrar::Finder as rustc::hir::itemlikevisit::ItemLikeVisitor<'v>>::visit_trait_item
26: <rustc_driver::pretty::IdentifiedAnnotation<'hir> as rustc_driver::pretty::PrinterSupport>::sess
27: <rustc_driver::derive_registrar::Finder as rustc::hir::itemlikevisit::ItemLikeVisitor<'v>>::visit_trait_item
28: rustc_driver::driver::compile_input
29: rustc_driver::run_compiler
30: <env_logger::filter::inner::Filter as core::fmt::Display>::fmt
31: rustc_driver::run_compiler
32: <rustc_driver::profile::trace::Query as core::fmt::Debug>::fmt
33: <rustc_driver::CompilationFailure as core::fmt::Debug>::fmt
34: _rust_maybe_catch_panic
35: <unknown>
36: rustc_driver::main
37: <unknown>
38: std::panicking::update_panic_count
39: _rust_maybe_catch_panic
40: std::rt::lang_start_internal
41: <unknown>
42: <unknown>
43: BaseThreadInitThunk
44: RtlUserThreadStart
query stack during panic:
#0 [crate_disambiguator] looking up the disambiguator a crate
end of query stack
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: rustc 1.31.0-nightly (78ff609d7 2018-10-19) running on x86_64-pc-windows-msvc
note: compiler flags: -C debuginfo=2 -C incremental --crate-type lib
note: some of the compiler flags provided by cargo are hidden
error: Could not compile `rust_fun`.
Metadata
Metadata
Assignees
Labels
A-impl-traitArea: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.Area: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.A-incr-compArea: Incremental compilationArea: Incremental compilationC-bugCategory: This is a bug.Category: This is a bug.F-impl_trait_in_bindings`#![feature(impl_trait_in_bindings)]``#![feature(impl_trait_in_bindings)]`I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way. When possible, use a F-* label instead.This issue requires a nightly compiler in some way. When possible, use a F-* label instead.
Activity
panicbit commentedon Oct 20, 2018
I've confirmed this on nightly 2018-10-19. Turning incremental compilation off avoids the ICE.
DutchGhost commentedon Oct 20, 2018
EDIT:
The issue seems to be in
#![feature(impl_trait_in_bindings)]Compiling the following for a first time works fine:
Then altering the file (insert a newline, a space...) and building again results in the ICE.
[-]Index out of bounds ICE[/-][+]impl_trait_in_bindings incremental compilation ICE[/+]danielhenrymantilla commentedon Nov 22, 2018
Was about to submit this bug, then found out about this issue.
I guess I'll just repeat what's been said before, but maybe it's useful.
TL,DR: When using the feature
impl_trait_in_bindings, changing closure argument type annotation, leads to an Internal Compiler Error when incremental compilation is involved:I (successfully) compiled this code
and then modified the code to add a type annotation on the closure argument:
I expected to see this happen: compiles successfully
Instead, this happened: compilation crashes (even just at
cargo checkstage)Observations
cargo cleanbefore the compilation prevents the crash.Meta
Backtrace:
gizmondo commentedon Mar 25, 2020
@DutchGhost, it seems this issue isn't reproducible anymore.
DutchGhost commentedon Mar 25, 2020
Closing since it isn't reproducable any longer.