Skip to content

Irrefutable bindings matching code is broken #3235

Closed
@bblum

Description

@bblum
fn main() {
    let x = "hello";
    let ref y = x;
    // let y = match x { ref y => y };  // this way works fine
    error!("%?", *y);
}

produces:

rustc: /home/bblum/rust/src/llvm/lib/VMCore/Instructions.cpp:280:
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.
Aborted (core dumped)

Happens with structs, tuples, etc too.

Metadata

Metadata

Assignees

Labels

A-codegenArea: Code generationI-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions