Skip to content

'rustc' panicked at 'assertion failed: (left == right) (left: collections::string::String, right: Box<Int>)', ../src/librustc_borrowck/borrowck/mod.rs:453 #27844

Closed
@toffaletti

Description

@toffaletti

Code to reproduce here: https://github.com/toffaletti/borrow-crash

rustc 1.2.0 (082e47636 2015-08-03)

stack backtrace:
   1:        0x103eb47b5 - sys::backtrace::write::hf5ea20500b66cd24uns
   2:        0x103ebd013 - panicking::on_panic::hbe02cb0d925cad49iGw
   3:        0x103e78dd2 - rt::unwind::begin_unwind_inner::h12ba0ba9dffdecc2uow
   4:        0x103e79b29 - rt::unwind::begin_unwind_fmt::hadf0dbf11d345ebfAnw
   5:        0x100c3568e - borrowck::LoanPath<'tcx>::common::h38c8ca06e07ec084irf
   6:        0x100c3366d - borrowck::check_loans::CheckLoanCtxt<'a, 'tcx>::report_error_if_loan_conflicts_with_restriction::h9e6281b29cbce21azGa
   7:        0x100c334fa - borrowck::check_loans::CheckLoanCtxt<'a, 'tcx>::report_error_if_loans_conflict::h9db6e8829e2a1ce8fEa
   8:        0x100c23250 - borrowck::check_loans::CheckLoanCtxt<'a, 'tcx>.euv..Delegate<'tcx>::borrow::hda5797bef3402e59Ria
   9:        0x100c2ad2c - middle::mem_categorization::MemCategorizationContext<'t, TYPER>::cat_pattern_::h14467536489201103802
  10:        0x100c2b5eb - middle::mem_categorization::MemCategorizationContext<'t, TYPER>::cat_pattern_::h14467536489201103802
  11:        0x100c2b12a - middle::mem_categorization::MemCategorizationContext<'t, TYPER>::cat_pattern_::h14467536489201103802
  12:        0x100c2a6e5 - middle::expr_use_visitor::ExprUseVisitor<'d, 't, 'tcx, TYPER>::walk_pat::h9458671995004733122
  13:        0x100c2f403 - middle::expr_use_visitor::ExprUseVisitor<'d, 't, 'tcx, TYPER>::walk_expr::h982213050074646850
  14:        0x100c326a2 - middle::expr_use_visitor::ExprUseVisitor<'d, 't, 'tcx, TYPER>::consume_expr::h8840565628159227535
  15:        0x100c2f649 - middle::expr_use_visitor::ExprUseVisitor<'d, 't, 'tcx, TYPER>::walk_expr::h982213050074646850
  16:        0x100c326a2 - middle::expr_use_visitor::ExprUseVisitor<'d, 't, 'tcx, TYPER>::consume_expr::h8840565628159227535
  17:        0x100c2f62e - middle::expr_use_visitor::ExprUseVisitor<'d, 't, 'tcx, TYPER>::walk_expr::h982213050074646850
  18:        0x100c326a2 - middle::expr_use_visitor::ExprUseVisitor<'d, 't, 'tcx, TYPER>::consume_expr::h8840565628159227535
  19:        0x100c2f433 - middle::expr_use_visitor::ExprUseVisitor<'d, 't, 'tcx, TYPER>::walk_expr::h982213050074646850
  20:        0x100c326a2 - middle::expr_use_visitor::ExprUseVisitor<'d, 't, 'tcx, TYPER>::consume_expr::h8840565628159227535
  21:        0x100c4cb45 - borrowck::borrowck_fn::h1de21a9e0166e8daEPe
  22:        0x100c4c1d9 - borrowck::BorrowckCtxt<'a, 'tcx>.Visitor<'v>::visit_fn::h93ef453410da10bc2Ge
  23:        0x100c4eb14 - visit::walk_impl_item::h15300236788859175913
  24:        0x100c4f7ca - visit::walk_item::h3483642570553201847
  25:        0x100c4ec68 - borrowck::check_crate::h138dee6ce4dd468bHJe
  26:        0x1007998a1 - driver::phase_3_run_analysis_passes::closure.15766
  27:        0x100796204 - middle::ty::with_ctxt::h14728011725879770170
  28:        0x10079100a - driver::phase_3_run_analysis_passes::h16713467199444562124
  29:        0x100774107 - driver::compile_input::hb6d2be5b0fa2247fTba
  30:        0x10085013f - run_compiler::h21d74b88eec3fe3bx7b
  31:        0x10084d9f3 - boxed::F.FnBox<A>::call_box::h1689969825914258414
  32:        0x10084d1b7 - rt::unwind::try::try_fn::h11273853850686318048
  33:        0x103f47cc8 - rust_try_inner
  34:        0x103f47cb5 - rust_try
  35:        0x103ea6c95 - rt::unwind::try::inner_try::h480e3107f6a4b5b9nkw
  36:        0x10084d3e8 - boxed::F.FnBox<A>::call_box::h888215220722514405
  37:        0x103ebba9d - sys::thread::Thread::new::thread_start::hdb3d925f69c5da4aHIv
  38:     0x7fff8f7f8059 - _pthread_body
  39:     0x7fff8f7f7fd6 - _pthread_start

Metadata

Metadata

Assignees

No one assigned

    Labels

    I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions