Skip to content

ICE: using associated types in extern function signature #28983

@jorisgio

Description

@jorisgio

I get an ICE with similar code to this testcase : (rustc 1.3.0 (9a92aaf19 2015-09-15))

trait Test {
   type T;
}

impl Test for u32 {
   type T = i32;
}

pub type I = <u32 as Test>::T;

pub extern "C" fn test(t : I) {}

trace :

thread 'rustc' panicked at 'Box<Any>', ../src/libsyntax/diagnostic.rs:253

stack backtrace:
   1:     0x7f32612f68ee - sys::backtrace::write::haf6e4e635ac76143Ivs
   2:     0x7f32612fefd5 - panicking::on_panic::ha085a58a08f78856lzx
   3:     0x7f32612bfbce - rt::unwind::begin_unwind_inner::hc90ee27246f12475C0w
   4:     0x7f325e6dc76c - rt::unwind::begin_unwind::h11988818671084554314
   5:     0x7f325e6de0eb - diagnostic::Handler::bug::h57b1fbd717704399sdB
   6:     0x7f325f2c95a8 - session::Session::bug::h42a2bcf9b9358d7aFRt
   7:     0x7f32600d2073 - trans::type_of::in_memory_type_of::h0b2beb6279eadc99CmN
   8:     0x7f32600d1abc - trans::type_of::in_memory_type_of::h0b2beb6279eadc99CmN
   9:     0x7f32600d4191 - trans::type_of::type_of::hc9e8f77b11cdf8c20lN
  10:     0x7f32601b5473 - vec::Vec<T>.FromIterator<T>::from_iter::h8884525770310809719
  11:     0x7f32601b4eb0 - trans::foreign::foreign_signature::h983512416c3490efwOF
  12:     0x7f32601b4ac9 - trans::foreign::foreign_types_for_fn_ty::hacded173730270321PF
  13:     0x7f3260105a5c - trans::foreign::register_rust_fn_with_foreign_abi::hfd00bac55a193331xgF
  14:     0x7f32600ffa12 - trans::base::get_item_val::hd0ae7a460f0d2610BBj
  15:     0x7f32600fba29 - trans::base::trans_item::hae00c0ff97548410Pdj
  16:     0x7f326010856c - trans::base::trans_crate::h001f92a4a2fe58ffi0j
  17:     0x7f32618705d4 - driver::phase_4_translate_to_llvm::h2c6a45f20e7923ee5Oa
  18:     0x7f326186ab65 - driver::phase_3_run_analysis_passes::closure.16545
  19:     0x7f3261864d91 - middle::ty::ctxt<'tcx>::create_and_enter::h17619121053301903364
  20:     0x7f326185fc71 - driver::phase_3_run_analysis_passes::h12169435128770927116
  21:     0x7f3261843d70 - driver::compile_input::h50576600c327a48aTba
  22:     0x7f326192a083 - run_compiler::h08c4308e3023ae95A7b
  23:     0x7f3261927afe - boxed::F.FnBox<A>::call_box::h5719507417069443679
  24:     0x7f3261927429 - rt::unwind::try::try_fn::h17024725433081724618
  25:     0x7f32612feacd - __rust_try
  26:     0x7f32612e9b77 - rt::unwind::try::inner_try::h59523aa853a0e10avWw
  27:     0x7f3261927648 - boxed::F.FnBox<A>::call_box::h16487981074879516847
  28:     0x7f32612fdc11 - sys::thread::Thread::new::thread_start::h890d1188505773c835v
  29:     0x7f325b9650a3 - start_thread
  30:     0x7f3260f5404c - clone
  31:                0x0 - <unknown>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions