Skip to content

Duplicate using lang item causing ICE #4572

@nsvke

Description

@nsvke

Code

#![feature(no_core, lang_items)]
#![no_core]

#[lang = "owned_box"]
pub struct Box;

#[lang = "owned_box"]
pub struct MyBox;

Error output

crab1: internal compiler error: in insert_lang_item_node, at rust/util/rust-hir-map.cc:1316
Backtrace

#0  0x00000000047d5e66 in internal_error(char const*, ...) ()
#1  0x00000000047e4525 in fancy_abort(char const*, int, char const*) ()
#2  0x00000000026e1b6e in Rust::Analysis::Mappings::insert_lang_item_node(Rust::LangItem::Kind, unsigned int) [clone .cold] ()
#3  0x000000000294cc8a in Rust::AST::CollectLangItems::visit(Rust::AST::StructStruct&) ()
#4  0x00000000025dae50 in Rust::AST::DefaultASTVisitor::visit(Rust::AST::Crate&) ()
#5  0x00000000026198e0 in Rust::Session::compile_crate(char const*) ()
#6  0x0000000004047c8f in compile_file() ()
#7  0x000000000404b980 in toplev::main(int, char**) ()
#8  0x00000000047afc6b in main ()

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions