Skip to content

Internal Compiler Error  #26445

Closed
Closed
@jtomschroeder

Description

@jtomschroeder

Description:

Internal compiler error with the following code:

pub trait Trait {}

impl PartialEq for Trait {
    fn eq(&self, other: &Self) -> bool {
        self as *const _ == other as *const _
    }
}

Version:

λ → rustc --version --verbose
rustc 1.2.0-nightly (2f5683913 2015-06-18)
binary: rustc
commit-hash: 2f5683913c9815d9f12494784747f79b0f3b3066
commit-date: 2015-06-18
host: x86_64-apple-darwin
release: 1.2.0-nightly

Backtrace:

thread 'rustc' panicked at 'assertion failed: self.appropriate_rvalue_mode(bcx.ccx()) == ByValue', ../src/librustc_trans/trans/datum.rs:635

stack backtrace:
   1:        0x10692f625 - sys::backtrace::write::h7217b77d522d376bzns
   2:        0x1069388c6 - panicking::on_panic::h734ff7875f002408HHw
   3:        0x1068eeff8 - rt::unwind::begin_unwind_inner::h12ac9fe1c7c1af05Tpw
   4:        0x102dec3ff - rt::unwind::begin_unwind::h9456661013370349045
   5:        0x102e84628 - trans::datum::Datum<'tcx, K>::to_llscalarish::h2090742821809817825
   6:        0x102f0c3d7 - trans::expr::trans_binary::h18b1ae4d157c7559UOC
   7:        0x102f0041a - trans::expr::trans_unadjusted::hb8364de9ecf82122hiB
   8:        0x102ed7a4c - trans::expr::trans_into::h37bf0f4f595d93d16DA
   9:        0x102e54d10 - trans::controlflow::trans_block::h4fbfe9e245dfbc46Ruv
  10:        0x102e5363a - trans::base::trans_closure::h34071d9a784d8f1cLWh
  11:        0x102e5533e - trans::base::trans_fn::h8b60fc728b696b76t7h
  12:        0x102e5914c - trans::base::trans_item::haac7f69fe6a753f8Yvi
  13:        0x102e66cfb - trans::base::trans_crate::hb1800db125dfa8773jj
  14:        0x102cbb42f - driver::phase_4_translate_to_llvm::ha90b5a4585d4395fBOa
  15:        0x102c93f4f - driver::compile_input::hc7efa8e10e996fb1Tba
  16:        0x102d56449 - run_compiler::hd964f53796cdaa72G7b
  17:        0x102d5393f - boxed::F.FnBox<A>::call_box::h1390611659955526416
  18:        0x102d53087 - rt::unwind::try::try_fn::h7096656292409969094
  19:        0x1069c8db8 - rust_try_inner
  20:        0x1069c8da5 - rust_try
  21:        0x106921075 - rt::unwind::try::inner_try::had4cdff9eafcbf1fMlw
  22:        0x102d532d2 - boxed::F.FnBox<A>::call_box::h7809183391410762880
  23:        0x10693729d - sys::thread::Thread::new::thread_start::hd1c42fff9d20c3856Jv
  24:     0x7fff95422267 - _pthread_body
  25:     0x7fff954221e4 - _pthread_start

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