Skip to content

ICE: assertion failed: ptr.bound_lifetimes.is_empty() #39089

Closed
@petrochenkov

Description

@petrochenkov

Code:

fn f<T: ?for<'a> Sized>() {}

fn main() {}

Compiler output:

rustc 1.16.0-nightly (1a2ed98d3 2017-01-13)
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: run with `RUST_BACKTRACE=1` for a backtrace

thread 'rustc' panicked at 'assertion failed: ptr.bound_lifetimes.is_empty()', /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/librustc_typeck/collect.rs:1668
stack backtrace:
   1:     0x7f508b2620fc - std::sys::imp::backtrace::tracing::imp::write::h9c41d2f69e5caabf
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:42
   2:     0x7f508b27057e - std::panicking::default_hook::{{closure}}::h1f61f3c769fffe7a
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/panicking.rs:351
   3:     0x7f508b270123 - std::panicking::default_hook::hd5bda4e453dfb4be
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/panicking.rs:361
   4:     0x7f508b270a1b - std::panicking::rust_panic_with_hook::hffbc74969c7b5d87
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/panicking.rs:555
   5:     0x7f50895f7eef - std::panicking::begin_panic::h0a82ee08bc6f08bc
   6:     0x7f50897188ac - rustc_typeck::collect::compute_bounds::h0a869ba1fa517450
   7:     0x7f5089716820 - rustc_typeck::collect::ty_generic_predicates::h68f6cb0ec14368ea
   8:     0x7f5089715e3d - rustc_typeck::collect::predicates_of_item::he8353891db94dad0
   9:     0x7f5089708199 - <rustc_typeck::collect::CollectItemTypesVisitor<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_item::h4bbb24faafcc596c
  10:     0x7f50897076c1 - rustc_typeck::collect::collect_item_types::h1797904c44ba1818
  11:     0x7f508972da79 - rustc_typeck::check_crate::h93455a3168487f9e
  12:     0x7f508b619c87 - rustc_driver::driver::phase_3_run_analysis_passes::{{closure}}::haccf5097991f72ff
  13:     0x7f508b57b2b9 - rustc::ty::context::TyCtxt::create_and_enter::hc186c58b8fad7ff4
  14:     0x7f508b5f9e20 - rustc_driver::driver::compile_input::h44853ffed84a12cb
  15:     0x7f508b63f0a2 - rustc_driver::run_compiler::hdc4bb0fcf7d0917a
  16:     0x7f508b543b4b - std::panicking::try::do_call::ha583797d32a865bd
  17:     0x7f508b27989a - __rust_maybe_catch_panic
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libpanic_unwind/lib.rs:98
  18:     0x7f508b56d852 - <F as alloc::boxed::FnBox<A>>::call_box::h6903719257a678be
  19:     0x7f508b26f3d4 - std::sys::imp::thread::Thread::new::thread_start::h76badbf9b0ecaf58
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/liballoc/boxed.rs:615
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/sys_common/thread.rs:21
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/sys/unix/thread.rs:84
  20:     0x7f5082ffb6b9 - start_thread
  21:     0x7f508af2682c - clone
  22:                0x0 - <unknown>

Happens on all versions of rustc.

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