Skip to content

ICE defining function taking raw trait object #42312

Closed
@ollie27

Description

@ollie27

The following code:

pub fn f(_: ToString) {}

fn main() {}

Produces the following in the playground:

rustc 1.17.0 (56124baa9 2017-04-24)
Incorrect number of arguments passed to called function!
  invoke void @_ZN4drop17h87bc09ef66481f99E(i8* %3)
          to label %bb1 unwind label %cleanup, !dbg !18
LLVM ERROR: Broken function found, compilation aborted!
rustc 1.18.0-beta.4 (0308c9865 2017-05-27)
Segmentation fault (core dumped)
rustc 1.19.0-nightly (5de00925b 2017-05-29)
rustc: /checkout/src/llvm/include/llvm/Support/Casting.h:95: static bool llvm::isa_impl_cl<To, const From*>::doit(const From*) [with To = llvm::Constant; From = llvm::Value]: Assertion `Val && "isa<> used on a null pointer"' failed.
Aborted (core dumped)

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.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