Skip to content

An option of a generic pointer triggers an LLVM assertion #9719

Closed
@lifthrasiir

Description

@lifthrasiir

Minimal example:

pub trait X { fn f(&self); }
impl X for int { fn f(&self) {} }
pub struct Z<'self>(Option<&'self X>);
pub fn main() { let x = 42; let z = Z(Some(&x as &X)); let _ = z; }

In my Windows machine, it results in:

Assertion failed: (i >= FTy->getNumParams() || FTy->getParamType(i) == Args[i]->getType()) && "Calling a function with a bad signature!", file c:/bot/slave/dist2-win/build/src/llvm/lib/IR/Instructions.cpp, line 281

Reproduced on Rust 0.8 and 0.9-pre (371a7ec). It doesn't seem to be Windows specific either.

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions