Skip to content

ICE on borrow check check_loans on stable #63932

Closed
@mark-i-m

Description

@mark-i-m

I don't know how to minimize this...

$ RUST_BACKTRACE=1 cargo run
   Compiling baguetteland v0.1.0 (/nobackup/baguetteland)
thread 'rustc' panicked at 'assertion failed: self.bccx.region_scope_tree.scopes_intersect(old_loan.kill_scope,
                                             new_loan.kill_scope)', src/librustc_borrowck/borrowck/check_loans.rs:493:9
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.29/src/backtrace/libunwind.rs:88
   1: backtrace::backtrace::trace_unsynchronized
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.29/src/backtrace/mod.rs:66
   2: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:47
   3: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:36
   4: std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:200
   5: std::panicking::default_hook
             at src/libstd/panicking.rs:214
   6: rustc::util::common::panic_hook
   7: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:481
   8: std::panicking::begin_panic
   9: rustc_borrowck::borrowck::check_loans::CheckLoanCtxt::report_error_if_loans_conflict
  10: rustc_borrowck::dataflow::DataFlowContext<O>::each_bit_on_entry
  11: <rustc_borrowck::borrowck::check_loans::CheckLoanCtxt as rustc::middle::expr_use_visitor::Delegate>::borrow
  12: rustc::middle::expr_use_visitor::ExprUseVisitor::borrow_expr
  13: rustc::middle::expr_use_visitor::ExprUseVisitor::walk_expr
  14: rustc::middle::expr_use_visitor::ExprUseVisitor::consume_expr
  15: rustc::middle::expr_use_visitor::ExprUseVisitor::walk_expr
  16: rustc::middle::expr_use_visitor::ExprUseVisitor::borrow_expr
  17: rustc::middle::expr_use_visitor::ExprUseVisitor::walk_expr
  18: rustc::middle::expr_use_visitor::ExprUseVisitor::consume_expr
  19: rustc::middle::expr_use_visitor::ExprUseVisitor::walk_expr
  20: rustc::middle::expr_use_visitor::ExprUseVisitor::consume_expr
  21: rustc::middle::expr_use_visitor::ExprUseVisitor::walk_expr
  22: rustc::middle::expr_use_visitor::ExprUseVisitor::consume_expr
  23: rustc_borrowck::borrowck::check_loans::check_loans
  24: rustc_borrowck::borrowck::borrowck
  25: rustc::ty::query::__query_compute::borrowck
  26: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors for rustc::ty::query::queries::borrowck>::compute
  27: rustc::dep_graph::graph::DepGraph::with_task_impl
  28: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
  29: rustc_mir::borrow_check::do_mir_borrowck
  30: rustc::ty::context::GlobalCtxt::enter_local
  31: rustc_mir::borrow_check::mir_borrowck
  32: rustc::ty::query::__query_compute::mir_borrowck
  33: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors for rustc::ty::query::queries::mir_borrowck>::compute
  34: rustc::dep_graph::graph::DepGraph::with_task_impl
  35: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
  36: rustc::ty::<impl rustc::ty::context::TyCtxt>::par_body_owners
  37: rustc::util::common::time
  38: rustc_interface::passes::analysis
  39: rustc::ty::query::__query_compute::analysis
  40: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors for rustc::ty::query::queries::analysis>::compute
  41: rustc::dep_graph::graph::DepGraph::with_task_impl
  42: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
  43: rustc::ty::context::tls::enter_global
  44: rustc_interface::passes::BoxedGlobalCtxt::access::{{closure}}
  45: rustc_interface::passes::create_global_ctxt::{{closure}}
  46: rustc_interface::interface::run_compiler_in_existing_thread_pool
  47: std::thread::local::LocalKey<T>::with
  48: scoped_tls::ScopedKey<T>::set
  49: syntax::with_globals
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
query stack during panic:
#0 [borrowck] processing `main`
#1 [mir_borrowck] processing `main`
#2 [analysis] running analysis passes on this 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.37.0 (eae3437df 2019-08-13) running on x86_64-unknown-linux-gnu

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

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

error: Could not compile `baguetteland`.

To learn more, run the command again with --verbose.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-borrow-checkerArea: The borrow checkerC-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.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions