Skip to content

ICE: Requires copy lang_item #19660

Closed
@japaric

Description

@japaric

STR

#![feature(lang_items)]
#![no_std]

#[lang = "sized"]
trait Sized {}

#[start]
fn main(_: int, _: *const *const u8) -> int {
    0
}

Output

error: requires `copy` lang_item
error: internal compiler error: unexpected panic
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 'called `Result::unwrap()` on an `Err` value: ErrorReported', /var/tmp/paludis/build/dev-lang-rust-scm/work/rust-scm/src/libcore/result.rs:744

Version

rustc 0.13.0-dev (c56e59c72 2014-12-09 07:51:52 +0000)

This shouldn't ICE, it should be a compiler error, just like when you forget to add the Sized trait.

error: requires `sized` lang_item
error: aborting due to previous error

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