Skip to content

ICE with associated types defaults  #23073

Closed
@jorisgio

Description

@jorisgio

Associated types defaults ( #19476 ) cause at least two different ICE with rustc 1.0.0-nightly (b4c965e 2015-03-02) (built 2015-03-03)

Case 1 : building :

trait Foo { type T; }
trait Bar {
    type Foo: Foo;
    type FooT = <<Self as Bar>::Foo as Foo>::T;
}

Case 2 : ICE

trait Foo { type T; }
trait Bar {
    type Foo: Foo;
    type FooT = <<Self>::Foo>::T;
}

backtrace :

  1:     0x7f9849be3baf - sys::backtrace::write::hbe65ff4402631268QyA
   2:     0x7f9849c0c6e2 - panicking::on_panic::h245e35885d5e01ccFDJ
   3:     0x7f9849b4743a - rt::unwind::begin_unwind_inner::he6d56a943f3050638jJ
   4:     0x7f9849b47b24 - rt::unwind::begin_unwind_fmt::h334fac4699ed6f75LiJ
   5:     0x7f9849c0c267 - rust_begin_unwind
   6:     0x7f9849c55cf4 - panicking::panic_fmt::hfac991238dca4c38b9r
   7:     0x7f9848fc8531 - PrivacyVisitor<'a, 'tcx>::check_path::h14d56d7374e51ab607a
   8:     0x7f9848fc957b - PrivacyVisitor<'a, 'tcx>.Visitor<'v>::visit_path::h1a3768654016f45e7vb
   9:     0x7f9848fc981e - visit::walk_ty::h8843244089880601813
  10:     0x7f9848fc93a1 - PrivacyVisitor<'a, 'tcx>.Visitor<'v>::visit_item::h8973ade95546b892xgb
  11:     0x7f9848fd046b - check_crate::hbba214d62d5303eexXb
  12:     0x7f984a26c390 - driver::phase_3_run_analysis_passes::h1b4e3b2c9313b117xFa
  13:     0x7f984a251301 - driver::compile_input::hc62aeb837327f1f4Iba
  14:     0x7f984a31bd2e - run_compiler::h978681e22b0d6976F5b
  15:     0x7f984a3198dc - thunk::F.Invoke<A, R>::invoke::h10120836201339486783
  16:     0x7f984a318630 - rt::unwind::try::try_fn::h11016953016221458849
  17:     0x7f9849c78028 - rust_try_inner
  18:     0x7f9849c78015 - rust_try
  19:     0x7f984a318d1c - thunk::F.Invoke<A, R>::invoke::h13067427317151836004
  20:     0x7f9849bf8235 - sys::thread::thread_start::h106a33ed9d873acaj5E
  21:     0x7f9843931313 - start_thread
  22:     0x7f98497ce24c - clone
  23: 0xffffffffffffffff - <unknown>

Case 3 : ICE

trait Foo { type T; }
trait Bar {
    type Foo: Foo;
    type FooT = Self::Foo::T;
}

backtrace :

stack backtrace:
   1:     0x7f8951506baf - sys::backtrace::write::hbe65ff4402631268QyA
   2:     0x7f895152f6e2 - panicking::on_panic::h245e35885d5e01ccFDJ
   3:     0x7f895146a43a - rt::unwind::begin_unwind_inner::he6d56a943f3050638jJ
   4:     0x7f895146ab24 - rt::unwind::begin_unwind_fmt::h334fac4699ed6f75LiJ
   5:     0x7f894f112ae6 - middle::def::PathResolution::full_def::h4c8aebcfff75b091YPk
   6:     0x7f89508eb3de - PrivacyVisitor<'a, 'tcx>::check_path::h14d56d7374e51ab607a
   7:     0x7f89508ec57b - PrivacyVisitor<'a, 'tcx>.Visitor<'v>::visit_path::h1a3768654016f45e7vb
   8:     0x7f89508ec3a1 - PrivacyVisitor<'a, 'tcx>.Visitor<'v>::visit_item::h8973ade95546b892xgb
   9:     0x7f89508f346b - check_crate::hbba214d62d5303eexXb
  10:     0x7f8951b8f390 - driver::phase_3_run_analysis_passes::h1b4e3b2c9313b117xFa
  11:     0x7f8951b74301 - driver::compile_input::hc62aeb837327f1f4Iba
  12:     0x7f8951c3ed2e - run_compiler::h978681e22b0d6976F5b
  13:     0x7f8951c3c8dc - thunk::F.Invoke<A, R>::invoke::h10120836201339486783
  14:     0x7f8951c3b630 - rt::unwind::try::try_fn::h11016953016221458849
  15:     0x7f895159b028 - rust_try_inner
  16:     0x7f895159b015 - rust_try
  17:     0x7f8951c3bd1c - thunk::F.Invoke<A, R>::invoke::h13067427317151836004
  18:     0x7f895151b235 - sys::thread::thread_start::h106a33ed9d873acaj5E
  19:     0x7f894b254313 - start_thread
  20:     0x7f89510f124c - clone
  21: 0xffffffffffffffff - <unknown>

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-associated-itemsArea: Associated items (types, constants & functions)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