Skip to content

ICE Struct += Struct #19337

Closed
Closed
@japaric

Description

@japaric

STR

struct Struct;

fn main() {
    Struct += Struct;
}

Output

ice.rs:4:5: 4:21 error: binary assignment operation `+=` cannot be applied to type `Struct`
ice.rs:4     Struct += Struct;
             ^~~~~~~~~~~~~~~~
error: internal compiler error: node_id_to_type: no type for node `expr Struct (id=13)`
note: the compiler unexpectedly panicked. 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' panicked at 'Box<Any>', /var/tmp/paludis/build/dev-lang-rust-scm/work/rust-scm/src/libsyntax/diagnostic.rs:180

stack backtrace:
   1:     0x7f7c8a53c210 - rt::backtrace::imp::write::h42dbac067ddfb84aK9x
   2:     0x7f7c8a53f2e0 - <unknown>
   3:     0x7f7c8a19c500 - unwind::begin_unwind_inner::h097035e7a55425d6YQc
   4:     0x7f7c880a3150 - <unknown>
   5:     0x7f7c880a3880 - diagnostic::Handler::bug::h66c514572f1833beW9F
   6:     0x7f7c88ef4410 - middle::ty::node_id_to_type::he348e5f01af17731ux6
   7:     0x7f7c890a6700 - middle::ty::expr_kind::hf3b8f186852d9e6bN26
   8:     0x7f7c891e4670 - <unknown>
   9:     0x7f7c8921b0b0 - middle::typeck::check::check_stmt::h95b51f23e662710fTUq
  10:     0x7f7c8919cde0 - <unknown>
  11:     0x7f7c89174cd0 - <unknown>
  12:     0x7f7c89199760 - <unknown>
  13:     0x7f7c891955d0 - middle::typeck::check::check_item::ha5af42104de2c03d8yl
  14:     0x7f7c891993f0 - middle::typeck::check::check_item_types::hc79bceba3c09db148dl
  15:     0x7f7c8953ccc0 - <unknown>
  16:     0x7f7c8953bed0 - middle::typeck::check_crate::ha9e443d271ae4b87PVO
  17:     0x7f7c8ab5dd00 - driver::driver::phase_3_run_analysis_passes::h3348c824d854c9b8VlS
  18:     0x7f7c8ab52d80 - driver::driver::compile_input::h96cfcd1fc8f6fbdd12R
  19:     0x7f7c8abd6cb0 - <unknown>
  20:     0x7f7c8abd6ba0 - <unknown>
  21:     0x7f7c8a9ded20 - <unknown>
  22:     0x7f7c8a50ce70 - <unknown>
  23:     0x7f7c8a19a2e0 - <unknown>
  24:     0x7f7c8a1eaf50 - <unknown>
  25:     0x7f7c8a1eaf40 - rust_try
  26:     0x7f7c8a19a3c0 - unwind::try::h76b36eb90468baffjFc
  27:     0x7f7c8a19a180 - task::Task::run::haf51cb923e41a2c8cOb
  28:     0x7f7c8a199d70 - <unknown>
  29:     0x7f7c8a19b7c0 - <unknown>
  30:     0x7f7c851081a0 - start_thread
  31:     0x7f7c89e72379 - clone
  32:                0x0 - <unknown>

Version

rustc 0.13.0-dev (8fb027e39 2014-11-26 12:02:16 +0000)

Maybe related to #9307 (see #9307 (comment)), but AFAIK += is not a lang item.

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