Skip to content

[NLL] rvalue-static-promotion.rs test ICEs #47593  #47594

Closed
@spastorino

Description

@spastorino
$ RUST_BACKTRACE=full rustc +stage1 src/test/run-pass/rvalue-static-promotion.rs -Znll -Zborrowck=mir -Ztwo-phase-borrows
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.25.0-dev running on x86_64-unknown-linux-gnu

note: run with `RUST_BACKTRACE=1` for a backtrace

thread 'rustc' panicked at 'assertion failed: identity_substs.is_empty()', librustc_mir/borrow_check/nll/universal_regions.rs:593:17
stack backtrace:
   0:     0x7eff45ca60fb - std::sys::unix::backtrace::tracing::imp::unwind_backtrace::h89e4e024185eb251
                               at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1:     0x7eff45cba861 - std::sys_common::backtrace::print::h2c98df9d22a6e204
                               at libstd/sys_common/backtrace.rs:68
                               at libstd/sys_common/backtrace.rs:57
   2:     0x7eff45c9b651 - std::panicking::default_hook::{{closure}}::hc4353cdd7897b77b
                               at libstd/panicking.rs:380
   3:     0x7eff45c9b271 - std::panicking::default_hook::h9bbd1477c233f26c
                               at libstd/panicking.rs:390
   4:     0x7eff45c9b946 - std::panicking::rust_panic_with_hook::hdfded1d66d2e81cf
                               at libstd/panicking.rs:576
   5:     0x7eff4398b381 - std::panicking::begin_panic::hd19c2591672191ce
                               at /home/santiago/src/oss/rust1/src/libstd/panicking.rs:537
   6:     0x7eff437de16e - rustc_mir::borrow_check::nll::universal_regions::UniversalRegions::new::hf70879742af60a25
                               at librustc_mir/borrow_check/nll/universal_regions.rs:593
                               at librustc_mir/borrow_check/nll/universal_regions.rs:448
                               at librustc_mir/borrow_check/nll/universal_regions.rs:215
   7:     0x7eff437b6b1b - rustc_mir::borrow_check::nll::replace_regions_in_mir::haf8b054c38d5b9c9
                               at librustc_mir/borrow_check/nll/mod.rs:54
   8:     0x7eff437ae73e - rustc_mir::borrow_check::do_mir_borrowck::h5527e035bdb6f90b
                               at librustc_mir/borrow_check/mod.rs:110
   9:     0x7eff4398bbcc - <std::thread::local::LocalKey<T>>::with::h09e3d281217138a6
                               at librustc_mir/borrow_check/mod.rs:81
                               at /home/santiago/src/oss/rust1/src/librustc/infer/mod.rs:439
                               at /home/santiago/src/oss/rust1/src/librustc/ty/context.rs:1573
                               at /home/santiago/src/oss/rust1/src/libstd/thread/local.rs:377
                               at /home/santiago/src/oss/rust1/src/libstd/thread/local.rs:288
  10:     0x7eff4377ff0a - rustc::ty::context::tls::enter::hf92705338ff04233
                               at /home/santiago/src/oss/rust1/src/librustc/ty/context.rs:1570
  11:     0x7eff4378266c - rustc::ty::context::GlobalCtxt::enter_local::h834852a1d0d3a09a
                               at /home/santiago/src/oss/rust1/src/librustc/ty/context.rs:1381
  12:     0x7eff4376b3f2 - rustc::infer::InferCtxtBuilder::enter::h876297f802958ad2
                               at /home/santiago/src/oss/rust1/src/librustc/infer/mod.rs:439
  13:     0x7eff437ae4ad - rustc_mir::borrow_check::mir_borrowck::ha3ddcadee42ed870
                               at librustc_mir/borrow_check/mod.rs:79
  14:     0x7eff4170eb90 - rustc::ty::maps::<impl rustc::ty::maps::queries::mir_borrowck<'tcx>>::compute_result::hf45a226b5c044941
                               at librustc/ty/maps/plumbing.rs:383
  15:     0x7eff41359108 - rustc::dep_graph::graph::DepGraph::with_task_impl::h977b285d649164fa
                               at librustc/dep_graph/graph.rs:289
  16:     0x7eff4132ba0f - rustc::dep_graph::graph::DepGraph::with_task::h606c300c86adccb4
                               at librustc/dep_graph/graph.rs:199
  17:     0x7eff41858057 - rustc_errors::Handler::track_diagnostics::h5c4733a59e59914c
                               at librustc/ty/maps/plumbing.rs:492
                               at /home/santiago/src/oss/rust1/src/librustc_errors/lib.rs:572
  18:     0x7eff415dbace - rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::cycle_check::h510dda0193aa77a2
                               at librustc/ty/maps/plumbing.rs:485
                               at librustc/ty/maps/plumbing.rs:121
  19:     0x7eff4170ec92 - rustc::ty::maps::<impl rustc::ty::maps::queries::mir_borrowck<'tcx>>::force::h5b5a43ddd69d4127
                               at librustc/ty/maps/plumbing.rs:484
  20:     0x7eff4170f921 - rustc::ty::maps::<impl rustc::ty::maps::queries::mir_borrowck<'tcx>>::try_get::hb7409412e9075295
                               at librustc/ty/maps/plumbing.rs:301
                               at librustc/ty/maps/plumbing.rs:526
  21:     0x7eff41663015 - rustc::ty::maps::TyCtxtAt::mir_borrowck::hb6ba692bbeabd5e9
                               at librustc/ty/maps/plumbing.rs:565
  22:     0x7eff415a6718 - rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::mir_borrowck::h44d6f533e09947b5
                               at librustc/ty/maps/plumbing.rs:558
  23:     0x7eff4602e155 - rustc_driver::driver::phase_3_run_analysis_passes::{{closure}}::{{closure}}::h5b4653d0f1e2de53
                               at librustc_driver/driver.rs:1073
  24:     0x7eff460f5226 - <std::thread::local::LocalKey<T>>::with::h5c65293ff59250fe
                               at librustc_driver/driver.rs:1071
                               at /home/santiago/src/oss/rust1/src/librustc/ty/context.rs:1573
                               at /home/santiago/src/oss/rust1/src/libstd/thread/local.rs:377
                               at /home/santiago/src/oss/rust1/src/libstd/thread/local.rs:288
  25:     0x7eff4601271e - rustc::ty::context::tls::enter::h88b739b20317ffe4
                               at /home/santiago/src/oss/rust1/src/librustc/ty/context.rs:1570
  26:     0x7eff460f3cec - <std::thread::local::LocalKey<T>>::with::h43c40e0d4e18765b
                               at /home/santiago/src/oss/rust1/src/librustc/ty/context.rs:1557
                               at /home/santiago/src/oss/rust1/src/libstd/thread/local.rs:377
                               at /home/santiago/src/oss/rust1/src/libstd/thread/local.rs:288
  27:     0x7eff460121d7 - rustc::ty::context::tls::enter_global::h0e8e2e22f658e325
                               at /home/santiago/src/oss/rust1/src/librustc/ty/context.rs:1554
  28:     0x7eff46016bf5 - rustc::ty::context::TyCtxt::create_and_enter::h1843d08844146f02
                               at /home/santiago/src/oss/rust1/src/librustc/ty/context.rs:1197
  29:     0x7eff4605be27 - rustc_driver::driver::phase_3_run_analysis_passes::hdca06791b92b8d71
                               at librustc_driver/driver.rs:1017
  30:     0x7eff4604dc57 - rustc_driver::driver::compile_input::h80b1c15489d523ea
                               at librustc_driver/driver.rs:220
  31:     0x7eff4603f646 - rustc_driver::run_compiler::h6941f27d9cf14ec2
                               at librustc_driver/lib.rs:248
  32:     0x7eff460ec97a - std::sys_common::backtrace::__rust_begin_short_backtrace::h2f40e38beb20488f
                               at librustc_driver/lib.rs:1305
                               at librustc_driver/lib.rs:132
                               at librustc_driver/lib.rs:1212
                               at /home/santiago/src/oss/rust1/src/libstd/sys_common/backtrace.rs:133
  33:     0x7eff45ccfe76 - __rust_maybe_catch_panic
                               at libpanic_unwind/lib.rs:102
  34:     0x7eff460cf437 - std::panicking::try::hf10cda8586478214
                               at /home/santiago/src/oss/rust1/src/libstd/panicking.rs:458
  35:     0x7eff460cf27d - std::panic::catch_unwind::h95b8c396b2db40d5
                               at /home/santiago/src/oss/rust1/src/libstd/panic.rs:358
  36:     0x7eff461019f3 - <F as alloc::boxed::FnBox<A>>::call_box::h6aa43ee35a088e4c
                               at /home/santiago/src/oss/rust1/src/libstd/thread/mod.rs:405
                               at /home/santiago/src/oss/rust1/src/liballoc/boxed.rs:817
  37:     0x7eff45cc2792 - std::sys_common::thread::start_thread::he35a8e58b745ed7d
                               at libstd/sys_common/thread.rs:24
  38:     0x7eff45cb7408 - std::sys::unix::thread::Thread::new::thread_start::h669389680624d627
                               at libstd/sys/unix/thread.rs:90
  39:     0x7eff3f51208b - start_thread
  40:     0x7eff45965e1e - __GI___clone
  41:                0x0 - <unknown>

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-NLLArea: Non-lexical lifetimes (NLL)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

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions