Skip to content

ICE: Didn't find associated type #17359

Closed
@japaric

Description

@japaric

STR

#![feature(associated_types)]

trait Trait {
    type Type;
}

impl Trait for int {}  // Type not defined

fn main() {}

Backtrace

ai.rs:7:6: 7:11 error: internal compiler error: ImplCtxt::associated_type_binding(): didn't find associated type
ai.rs:7 impl Trait for int {}  // Type not defined
             ^~~~~
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at 'Box<Any>', /var/tmp/paludis/build/dev-lang-rust-scm/work/rust-scm/src/libsyntax/ast_util.rs:751

stack backtrace:
   1:     0x7f588da79bb0 - rt::backtrace::imp::write::hc0f5116acb0fa00fiHq
   2:     0x7f588da7cd70 - <unknown>
   3:     0x7f5891fbdd30 - unwind::begin_unwind_inner::hf187fcd15f4370d8MTd
   4:     0x7f588e831cd0 - <unknown>
   5:     0x7f588e831c20 - diagnostic::SpanHandler::span_bug::hca7ebac09aed6025CPE
   6:     0x7f58927e2200 - driver::session::Session::span_bug::hf41e547e99d83d2bYVx
   7:     0x7f5892d98600 - middle::typeck::collect::ImplCtxt<'a, 'tcx>.AstConv<'tcx>::associated_type_binding::h834dfdcb9583a09f5Jf
   8:     0x7f5892db1d40 - <unknown>
   9:     0x7f5892db1c30 - <unknown>
  10:     0x7f5892cf09d0 - middle::typeck::collect::convert::h2728a6bcdd8a728cz3f
  11:     0x7f5892ce97b0 - middle::typeck::collect::collect_item_types::h99c4220d60602bb7q4e
  12:     0x7f5892621250 - <unknown>
  13:     0x7f5892eb9cf0 - middle::typeck::check_crate::h91df432dc60c3cf1WIk
  14:     0x7f5892f26c00 - driver::driver::phase_3_run_analysis_passes::h549b08e03a551280Ucx
  15:     0x7f5892f22070 - driver::driver::compile_input::h12d833316d032e85RTw
  16:     0x7f5892fa7160 - <unknown>
  17:     0x7f5892fa7040 - <unknown>
  18:     0x7f589263aa40 - <unknown>
  19:     0x7f589263a830 - <unknown>
  20:     0x7f58923075c0 - <unknown>
  21:     0x7f589200cb00 - <unknown>
  22:     0x7f589200caf0 - rust_try
  23:     0x7f5891fbb330 - unwind::try::h3fd431c8ae9db728uId
  24:     0x7f5891fbb190 - task::Task::run::h8df699a6a6fb1c6ecYc
  25:     0x7f5892307330 - <unknown>
  26:     0x7f5891fbcd80 - <unknown>
  27:     0x7f588ce26fb0 - start_thread
  28:     0x7f5891c8bf99 - clone
  29:                0x0 - <unknown>

Version

rustc 0.12.0-pre (9508faa22 2014-09-17 23:45:36 +0000)

cc @pcwalton

Metadata

Metadata

Assignees

No one assigned

    Labels

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