Closed
Description
Reported by @sfackler
#![feature(overloaded_calls)]
trait Foo {}
struct Bar;
impl<'a> std::ops::Fn<(&'a Foo,), ()> for Bar {
fn call(&self, _: (&'a Foo,)) {}
}
struct Baz;
impl Foo for Baz {}
fn main() {
let bar = Bar;
let baz = &Baz;
bar(baz);
}
rustc: /scratch/laden/rust/src/llvm/lib/IR/Instructions.cpp:281: void llvm::CallInst::init(llvm::Value*, llvm::ArrayRef<llvm::Value*>, const llvm::Twine&): Assertion `(i >= FTy->getNumParams() || FTy->getParamType(i) == Args[i]->getType()) && "Calling a function with a bad signature!"' failed.