Skip to content

ICE when playing with no_std -- requires sized lang_item #17392

Closed
@eminence

Description

@eminence

The error message is clear enough, but it seems like this shouldn't be an ICE

achin@bigbox ~/tmp/rust $ cat a.rs
#![no_std]

fn start(argc: int, argv: *const *const u8) -> int {
#![start]
    0
}

achin@bigbox ~/tmp/rust $ env RUST_BACKTRACE=1 rustc a.rs
a.rs:3:10: 3:14 error: internal compiler error: requires `sized` lang_item
a.rs:3 fn start(argc: int, argv: *const *const u8) -> int {
                ^~~~
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>', /storage/home/achin/devel/rust/src/libsyntax/ast_util.rs:751

stack backtrace:
   1:     0x7f12bb0c0320 - rt::backtrace::imp::write::h5011a823a9d2b90elLq
   2:     0x7f12bb0c34e0 - failure::on_fail::h8355a77906713dc1N6q
   3:     0x7f12bf6b5fc0 - unwind::begin_unwind_inner::hf77d41f3604ab71fMTd
   4:     0x7f12bbe80f30 - unwind::begin_unwind::h8610426004860857751
   5:     0x7f12bbe80e80 - diagnostic::SpanHandler::span_bug::h925d5319dcb2c79dCPE
   6:     0x7f12bfee7c80 - driver::session::Session::span_bug::hb917b060592cc0ddBVx
   7:     0x7f12c00e0270 - middle::traits::util::obligation_for_builtin_bound::h5938aa6972bf6dc1JTX
   8:     0x7f12c02e87a0 - middle::typeck::check::FnCtxt<'a, 'tcx>::require_type_meets::hbacd2d580e0d8f3dMRU
   9:     0x7f12c02d4ef0 - middle::typeck::check::check_fn::closure.133210
  10:     0x7f12c000f3b0 - middle::pat_util::pat_bindings::closure.119668
  11:     0x7f12bbe47fc0 - ast_util::walk_pat::h7662487bce0fe586boB
  12:     0x7f12c02cfb90 - middle::typeck::check::check_fn::h52ba20c670decb0agUS
  13:     0x7f12c02cf9a0 - middle::typeck::check::check_bare_fn::h86b61dfcb7621b98jJS
  14:     0x7f12c02c8760 - middle::typeck::check::check_item::h3fa2f0abe5095d12YgT
  15:     0x7f12c02cf620 - middle::typeck::check::check_item_types::h0692a1ee5102a933hIS
  16:     0x7f12bfd269d0 - util::common::time::h18183101536224942747
  17:     0x7f12c05c14f0 - middle::typeck::check_crate::h703f92e8dad23bd1zIk
  18:     0x7f12c062e340 - driver::driver::phase_3_run_analysis_passes::hb0cf3abc00099bf1xcx
  19:     0x7f12c06297b0 - driver::driver::compile_input::hdc9d5d157f48b333uTw
  20:     0x7f12c06ae7f0 - driver::run_compiler::hfa4d73e40e8a65111KA
  21:     0x7f12c06ae6d0 - driver::main_args::closure.147050
  22:     0x7f12bfd401c0 - task::TaskBuilder<S>::try_future::closure.101861
  23:     0x7f12bfd3ffb0 - task::TaskBuilder<S>::spawn_internal::closure.101832
  24:     0x7f12bfa06bd0 - task::spawn_opts::closure.8443
  25:     0x7f12bf70c400 - rust_try_inner
  26:     0x7f12bf70c3f0 - rust_try
  27:     0x7f12bf6b35c0 - unwind::try::hed0a4efeac87f00buId
  28:     0x7f12bf6b3420 - task::Task::run::h9fc26630f08499c2cYc
  29:     0x7f12bfa06940 - task::spawn_opts::closure.8383
  30:     0x7f12bf6b5010 - thread::thread_start::h1e1e155278f838d3rid
  31:     0x7f12ba466100 - start_thread
  32:     0x7f12bf38ad49 - clone
  33:                0x0 - <unknown>

Built with rustc 0.12.0-pre (af3889f 2014-09-18 21:20:38 +0000)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-DSTsArea: Dynamically-sized types (DSTs)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